lof_scores {weird} | R Documentation |
Compute local outlier factors using k nearest neighbours. A local
outlier factor is a measure of how anomalous each observation is based on
the density of neighbouring points.
The function uses dbscan::lof
to do the calculation.
lof_scores(y, k = 10, ...)
y |
Numerical matrix or vector of data |
k |
Number of neighbours to include. Default: 5. |
... |
Additional arguments passed to |
Numerical vector containing LOF values
Rob J Hyndman
dbscan::lof
y <- c(rnorm(49), 5)
lof_scores(y)