View source: R/idld_multivariated.R
| idld_m | R Documentation |
Calculates the integrated dual local depth for multivariate data
Z |
data to apply depth. It should be a numeric matrix where each row represents an observation. |
data_m |
data on which depth is based. It should be a numeric matrix where each row represents an observation. |
beta |
locality parameter between 0 and 1 |
m |
number of random projections |
verbose |
if TRUE prints the algorithm progress. |
A numeric vector that contains the depth for each point.
library(mvnfast)
X = rmvn(90, c(-2,-2), sigma=diag(rep(1,2)))
Y = rmvn(110, c(2,2), sigma=diag(rep(1,2)))
Z = rmvn(150, c(4,-4), sigma = rbind(c(2,0.8),c(0.8,1)))
W = rbind(X,Y,Z)
local_depth = idld_m(W, W ,0.3, 500, TRUE)
plot(W, pch=20)
local_depth_center_region = which(local_depth>quantile(local_depth,0.9))
points(W[local_depth_center_region,], col="blue", pch=20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.