idld_m: Multivariate Integrated Dual Local Depth

View source: R/idld_multivariated.R

idld_mR Documentation

Multivariate Integrated Dual Local Depth

Description

Calculates the integrated dual local depth for multivariate data

Arguments

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.

Value

A numeric vector that contains the depth for each point.

Examples

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)


lfernandezpiana/idld documentation built on Feb. 17, 2024, 11:42 p.m.