abod {abodOutlier} | R Documentation |
Computes angle-based outlier factor for each observation in the dataset
abod(data, method = "complete", n_sample_size = trunc(nrow(data)/10), k = 15)
data |
Dataframe in which to compute angle-based outlier factor. |
method |
Method to perform. 'complete' will use the entire dataset (cubic complexity) to compute abof. 'randomized' will use a random sample of the data of size 'n_sample_size'. 'knn' will compute abof among 'k' nearest neighbours. |
n_sample_size |
Number of random observations to choose in randomized method. |
k |
Number of nearest neighbours to choose in knn method. |
Please note that 'knn' has to compute an euclidean distance matrix before computing abof.
Returns angle-based outlier factor for each observation. A small abof respect the others would indicate presence of an outlier.
Jose Jimenez <jose@jimenezluna.com>
[1] Angle-Based Outlier Detection in High-dimensional Data. KDD 2008. Hans-Peter Kriegel, Matthias Schubert, Arthur Zimek. (http://www.dbs.ifi.lmu.de/Publikationen/Papers/KDD2008.pdf)
abod(faithful, method = "randomized", n_sample_size = 5) abod(faithful, method = "knn", k = 5)