Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

depth.contours.ddalpha

Depth Contours


Description

Builds the data depth contours for multiclass 2-dimensional data using the trained classifier. Also accessible from plot.ddalpha.

Usage

depth.contours.ddalpha(ddalpha,
              main = "", xlab="", ylab = "", 
              drawplot = T, frequency=100, levels = 10, drawsep = T, ...)

Arguments

ddalpha

DDα-classifier (obtained by ddalpha.train).

main

an overall title for the plot: see title

xlab, ylab

labels of the axes

drawplot

if set to false, the contours are built on the existing plot.

frequency

number of points on each direction, x and y. Impacts the smoothness of the contours.

levels

numeric vector of levels at which to draw contour lines. If the vector contains only ONE element, the levels are generated automatically as seq(0, max(depth), length.out = levels).

drawsep

draws the separation on the DD-plot (currently for 2 classes and not for knn)

...

additional parameters passed to the depth functions and to plot

See Also

Examples

## Not run: 

par(mfrow = c(2,2))
data(hemophilia)

ddalpha = ddalpha.train(hemophilia, depth = "none")
depth.contours.ddalpha(ddalpha, main = "data")

for (depth in c("zonoid", "Mahalanobis", "projection", "spatial")){
  ddalpha = ddalpha.train(hemophilia, depth = depth)
  depth.contours.ddalpha(ddalpha, main = depth)
}

for (depth in c("halfspace", "simplicial", "simplicialVolume")){
  ddalpha = ddalpha.train(hemophilia, depth = depth, exact = T)
  depth.contours.ddalpha(ddalpha, main = depth)
}



## End(Not run)

ddalpha

Depth-Based Classification and Calculation of Data Depth

v1.3.11
GPL-2
Authors
Oleksii Pokotylo [aut, cre], Pavlo Mozharovskyi [aut], Rainer Dyckerhoff [aut], Stanislav Nagy [aut]
Initial release
2020-01-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.