lof

fun lof(x: Array<DoubleArray>, k: Int = 20): LOF<DoubleArray>(source)

Fits a Local Outlier Factor (LOF) model using a KD-tree for spatial neighborhood search.

Return

the fitted model.

Parameters

x

training observations.

k

the number of nearest neighbors.


fun <T> lof(x: Array<T>, distance: Distance<T>, k: Int = 20): LOF<T>(source)

Fits a Local Outlier Factor (LOF) model on arbitrary objects in a metric/distance space.

Return

the fitted model.

Parameters

x

training observations.

distance

the distance function.

k

the number of nearest neighbors.


fun <T> lof(x: Array<T>, nns: KNNSearch<T, T>, k: Int = 20): LOF<T>(source)

Fits a Local Outlier Factor (LOF) model using a provided nearest neighbor search structure.

Return

the fitted model.

Parameters

x

training observations.

nns

the nearest neighbor search structure.

k

the number of nearest neighbors.