Skip to contents

The variance of the cosine-weighted angles a point subtends with all pairs of other points. For a point inside the cloud the angles vary widely; for a point far outside, every other point lies in roughly the same direction and the variance collapses. LOW variance means outlying, so the reported score negates the ABOF.

Usage

morie_abod(X, k = NULL)

Arguments

X

numeric matrix, one row per observation.

k

optional number of nearest neighbours to approximate over. The exact version is O(n^3); k makes it O(n k^2). NULL uses every other point.

Value

list with abof, score (negated ABOF), rank (0-based, most outlying first) and k.

Details

Angles keep working where distances stop: in high dimensions all pairwise distances concentrate, and that is what ABOD was built for.

References

Kriegel, H.-P., Schubert, M. and Zimek, A. (2008). Angle-based outlier detection in high-dimensional data. KDD.

Examples

set.seed(1)
X <- rbind(matrix(rnorm(60), ncol = 2), c(9, 9))
which.min(morie_abod(X)$abof) # the planted point
#> [1] 31