TimeSeriesOCSVMDetector
Detect subsequence anomalies in time series using a one-class SVM detector
Since R2026a
Description
Add-On Required: This feature requires the Time Series Anomaly Detection for MATLAB add-on.
The TimeSeriesOcsvmAD object implements an anomaly detector based
on the machine learning One-Class SVM (support vector machine)
algorithm. This algorithm detects anomalies by separating data from the origin in the
transformed high-dimensional predictor space, and finding a decision boundary.
TimeSeriesOCSVMDetector provides a time series version, for outlier point
and subsequence detection, of the ocsvm detector in
Statistics and Machine Learning Toolbox™.
Creating a TimeSeriesOCSVMDetector 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
TimeSeriesOCSVMDetector is based, see the "More About" section in OneClassSVM in
Statistics and Machine Learning Toolbox.
For more information on the functions this workflow uses, see Object Functions.
Creation
Create a TimeSeriesOCSVMDetector object by using the timeSeriesOcsvmAD 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 |
plotHistogram | Plot histogram of anomaly scores and detection threshold for trained machine learning anomaly detector |
Version History
Introduced in R2026a