isanomaly
Syntax
Description
finds anomalies in the table tf = isanomaly(LOFObj,Tbl)Tbl using the LocalOutlierFactor
object LOFObj and returns the logical array tf,
whose elements are true when an anomaly is detected in the corresponding
row of Tbl. You must use this syntax if you create
LOFObj by passing a table to the lof
function.
specifies options using one or more name-value arguments in addition to any of the input
argument combinations in the previous syntaxes. For example,
tf = isanomaly(___,Name=Value) causes
scoreThreshold=0.5isanomaly to identify observations with scores above
0.5 as anomalies.
[
also returns an anomaly score, which is a local
outlier factor value, for each observation in tf,scores] = isanomaly(___)Tbl or
X. A score value less than or close to 1 indicates a normal
observation, and a value greater than 1 can indicate an anomaly.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Algorithms
To compute the local outlier factor values (
scores) for each observation inTblorX,isanomalyfinds the k-nearest neighbors among the training observations stored in theXproperty of aLocalOutlierFactorobject.isanomalyconsidersNaN,''(empty character vector),""(empty string),<missing>, and<undefined>values inTblandNaNvalues inXto be missing values.isanomalydoes not use observations with missing values.isanomalyassigns the anomaly score ofNaNand anomaly indicator offalse(logical 0) to observations with missing values.
References
[1] Breunig, Markus M., et al. “LOF: Identifying Density-Based Local Outliers.” Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, 2000, pp. 93–104.




