Anomaly Detection
Statistics and Machine Learning Toolbox™ provides several anomaly detection features for unlabeled multivariate sample data. You can also detect anomalies in streaming data using one-class support vector machine (SVM) and robust random cut forest algorithms (see Incremental Anomaly Detection Overview). The anomaly detection features detect outliers (anomalies in training data) either by training a model or by learning parameters. For novelty detection (detecting anomalies in new data with uncontaminated training data), you train a model or learn parameters with uncontaminated training data (data with no outliers) and detect anomalies in new data by using the trained model or learned parameters. For more details, see Unsupervised Anomaly Detection.
If you have training data labeled as normal points and anomalies, you can
train a binary classification model and use the
resubPredict
and predict
object
functions to detect anomalies in the training data and new data, respectively.
For the list of supported classification features, see Classification.
The toolbox also provides model-specific anomaly detection features that you can apply after training a classification, regression, or clustering model. For details, see Model-Specific Anomaly Detection.
Functions
Objects
IsolationForest | Isolation forest for anomaly detection (Since R2021b) |
RobustRandomCutForest | Robust random cut forest model for anomaly detection (Since R2023a) |
LocalOutlierFactor | Local outlier factor model for anomaly detection (Since R2022b) |
OneClassSVM | One-class support vector machine (SVM) for anomaly detection (Since R2022b) |
Topics
- Unsupervised Anomaly Detection
Detect anomalies using isolation forest, robust random cut forest, local outlier factor, one-class SVM, and Mahalanobis distance.
- Incremental Anomaly Detection Overview
Discover fundamental concepts about incremental anomaly detection in streaming data.
- Configure Model for Incremental Anomaly Detection
Prepare a model for incremental anomaly detection and fitting on a data stream.
- Anomaly Detection with Isolation Forest
Detect anomalies by isolating anomalies from normal points using an isolation forest (ensemble of isolation trees).
- Model-Specific Anomaly Detection
After training a classification, regression, or clustering model, detect anomalies using a model-specific anomaly detection feature.
- Build Condition Model for Industrial Machinery and Manufacturing Processes
Train a binary classification model using Classification Learner App to detect anomalies in sensor data collected from an industrial manufacturing machine.
- Code Generation for Anomaly Detection
Generate single-precision code that detects anomalies in data using a trained isolation forest model or one-class SVM.
Related Information
- Anomaly Detection in Industrial Machinery Using Three-Axis Vibration Data (Predictive Maintenance Toolbox)