Isolation Forest For Anomaly Detection

Amy @GrabNGoInfo
GrabNGoInfo
Published in
6 min readApr 24, 2022

--

Use a tree-based model to identify outliers and continue training the model using new data

Isolation Forest For Anomaly Detection. Use a tree-based model to identify outliers and continue training the model using new data.
Photo by Rodion Kutsaev on Unsplash

Isolation forest uses the number of tree splits to identify anomalies or minority classes in an imbalanced dataset. The idea is that anomaly data points take fewer splits because the density around the anomalies is low. Python’s sklearn library has an implementation for the isolation forest model.

Isolation forest is an unsupervised algorithm, where the actual labels of normal vs. anomaly data points are not used in model training.

In this article, you will learn

  • What is an isolation forest model?
  • How to build an isolation forest model using Python?
  • How to use an isolation forest model to do anomaly detection?
  • How to continue training an isolation forest model using new data?
  • How to continue training an isolation forest model using more trees?

Resources for this post:

--

--