Definition
Definition
- Isolation Forest is an algorithm for data anomaly detection and was initially developed by Fei Tony Liu in 2008 using binary trees.
- The algorithm has linear time complexity and a low memory requirement, so it works well with high-volume data.
- No density or distance estimation is performed in the algorithm.
- This algorithm is different from decision tree algorithms: only the path-length measure or approximation is begin used to generate the anomaly score, no leaf node statistics on class distribution or target value is needed.
Why fast ?
- Isolation Forest is fast because it splits the data space randomly, using randomly selected attribute and randomly selected split point.
Algorithm
- The premise of the iForest algorithm is that anomalous data1 points are easier to separate from the rest of the sample.
- iForest algorithm recursively generate partitions on the sample by randomly selecting an attribute and then randomly selecting a split value between minimum and maximum values allowed for that attribute.
- Let be a set of d-dimensional points and . An Isolation Tree (iTree) is defined as a data structure with following properties:
- each node T in the Tree, T is either an external-node with no child, or an internal-node with one "test" and exactly two child nodes ( or )
- a test at node consists of an attribute and a split value such that the test determines the traversal of a data point to either ( or )
- To build an iTree, the algorithm recursively divides by randomly selecting an attribute and a split value , until either:
- the node has only one instance
- all data at the node have the same value
- When the iTree is fully grown, each point in is isolated at one of the external nodes. Intuitively, the anomalous points1 have smaller path length in the tree.
- Path length of points is defined as the number of edges traverses from the root node to get to an external node.