TimeSeriesLOFDetector
Detect subsequence anomalies in time series using a local outlier factor algorithm
Since R2026a
Description
Add-On Required: This feature requires the Time Series Anomaly Detection for MATLAB add-on.
The TimeSeriesLOFDetector object implements a local outlier
factor algorithm within a detector model capable of being trained to detect subsequence
anomalies in time series data using only nominal data.
TimeSeriesLOFDetector provides a time series version, for outlier point
and subsequence detection, of the lof detector in
Statistics and Machine Learning Toolbox™.
Creating a TimeSeriesLOFDetector model is the first step in a workflow
that includes training the detector with normal data, testing the detector with anomalous
data, and validating the model by visualizing detection effectiveness on anomalous data using
plotting functions. To improve detection performance, you can use updateDetector
to change certain properties, such as threshold properties, by updating the trained model
without retraining. To change other properties, you must create a new detector object and
specify the new properties using name-value arguments. You cannot modify detector properties
using dot notation.
For more information on the local outlier algorithm on which
TimeSeriesLOFDetector is based, see the "More About" section in LocalOutlierFactor in
Statistics and Machine Learning Toolbox.
For more information on the functions this workflow uses, see Object Functions.
Creation
Create a TimeSeriesLOFDetector object by using the timeSeriesLofAD function.
Properties
Object Functions
train | Train time series machine learning anomaly detector and obtain detection threshold |
detect | Detect anomalies in time series using a trained time series machine learning detector model |
plot | Plot detected anomalies and anomaly scores generated from trained machine learning anomaly detectors |
plotHistogram | Plot histogram of anomaly scores and detection threshold for trained machine learning anomaly detector |
updateDetector | Update settings of a trained time series machine learning anomaly detector and recompute detection threshold |
Version History
Introduced in R2026a