Categories &

Functions List

Class Definition: LocalOutlierFactor

statistics: LocalOutlierFactor

Local Outlier Factor model for anomaly detection.

A LocalOutlierFactor object stores a Local Outlier Factor (LOF) model fitted to a set of observations, and detects anomalies among those or new observations through the isanomaly method. Create a model with the lof function rather than by calling this constructor directly.

The LOF of an observation compares its local density with the local density of its neighbors; a value near 1 indicates an inlier, whereas a value well above 1 indicates an outlier that lies in a sparser region than its neighbors.

See also: lof, isanomaly

Source Code: LocalOutlierFactor

The LocalOutlierFactor class contains the following properties:

The LocalOutlierFactor class offers the following public methods:

LocalOutlierFactor: Mdl = LocalOutlierFactor (X)
LocalOutlierFactor: Mdl = LocalOutlierFactor (X, name, value)

LocalOutlierFactor: tf = isanomaly (Mdl, Xnew)
LocalOutlierFactor: [tf, scores] = isanomaly (Mdl, Xnew)
LocalOutlierFactor: […] = isanomaly (…, 'ScoreThreshold', t)

LocalOutlierFactor: tf = isanomaly (Mdl, Xnew)
LocalOutlierFactor: [tf, scores] = isanomaly (Mdl, Xnew)
LocalOutlierFactor: […] = isanomaly (…, 'ScoreThreshold', t)