Isolated forest is a popular machine learning algorithm for anomaly detection. Isolated forests can assist in complex data models that have overlapping values. An isolated forest is an ensemble regression. Rather than using a clustering or distance-based algorithm like other machine learning algorithms, it separates outlying data points from normal data points. It does this by building a decision tree and calculates a score based on node count traversal in its path decision tree of where the data lies. In other words, it counts the number of nodes it traverses to determine an outcome. The more data that has been trained on a model, the more nodes an isolated forest would need to traverse.
Similar to the previous recipe, we are going to use pyod to easily train a model. We are going to use the Sense HAT dataset that is in the GitHub repository.