One-Class SVM For Anomaly Detection
Use unsupervised One-Class Support Vector Machine to detect outliers
One-Class Support Vector Machine (SVM) is an unsupervised model for anomaly or outlier detection. Unlike the regular supervised SVM, the one-class SVM does not have target labels for the model training process. Instead, it learns the boundary for the normal data points and identifies the data outside the border to be anomalies.
In this post, we will use Python’s sklearn
library to implement one-class SVM. You will learn the following after reading the post:
- How to train a one-class support vector machine (SVM) model
- How to predict anomalies from a one-class SVM model
- How to change the default threshold for anomaly prediction
- How to visualize the prediction results
Resources for this post:
- Video tutorial on YouTube
- Python code is at the end of the post, click here for the notebook.
- More video tutorials on anomaly detection
- More blog posts on anomaly detection
Let’s get started!