smile.anomaly

package smile.anomaly

Anomaly and outlier detection.

Attributes

Members list

Value members

Concrete methods

def isolationforest(x: Array[Array[Double]], trees: Int = ..., maxDepth: Int = ..., subsample: Double = ..., extensionLevel: Int = ...): IsolationForest

Fits an Isolation Forest model for anomaly detection.

Fits an Isolation Forest model for anomaly detection.

Value parameters

extensionLevel

extension level for hyperplanes (0 for standard axis-aligned).

maxDepth

the maximum depth of an isolation tree (0 for log2(subsample)).

subsample

the sampling rate for each tree.

trees

the number of trees.

x

training samples.

Attributes

Returns

the fitted model.

def lof(x: Array[Array[Double]], k: Int = ...): LOF[Array[Double]]

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

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

Value parameters

k

the number of nearest neighbors.

x

training observations.

Attributes

Returns

the fitted model.

def ocsvm[T <: AnyRef](x: Array[T], kernel: MercerKernel[T], nu: Double = ..., tol: Double = ...): SVM[T]

Fits a one-class support vector machine (One-Class SVM).

Fits a one-class support vector machine (One-Class SVM).

Type parameters

T

input observation type.

Value parameters

kernel

the Mercer kernel function.

nu

upper bound on the fraction of outliers.

tol

tolerance of convergence test.

x

training samples.

Attributes

Returns

the fitted model.