Random axis-parallel splits; the depth at which a point becomes
isolated is the statistic. Anomalies are isolated in few splits, so
short average path length means high score. The normalisation
c(psi) is the average path length of an unsuccessful search in
a binary search tree, which is what makes scores comparable across
subsample sizes.
Arguments
- X
numeric matrix, one row per observation.
- n_trees
number of trees.
- sample_size
subsample size per tree (capped at
nrow(X)). Subsampling is not only for speed – it reduces swamping.- seed
integer seed. R's generator is not numpy's, so scores will not match the Python module value-for-value; the rankings do.
