Help interpreting outliers/anomalies when using Isolation Forest operator
kdafoe
New Altair Community Member
Hi. I'm really liking the Isolation Forest operator under the Anomaly Detection Extension. Trees =100, Leaf Size =2, and average path as the score calculation gives me a result where the first 5 outliers match exactly with an R script using the Mahalanobis Distance function. That is great for comparisons. But is there a calculation or rule of thumb that you suggest for the Trees parameter? Or for cutoff score? Using my R script comparison I can easily match the 5 lowest scores. Score wise, is there a point or a calculation where outliers/anomalies end and the rest are not outliers? Thanks for any help.
Tagged:
0
Best Answer
-
Hi,great to hear that we produce the same output as R. I am the author of it and I only compared to sklearn.I think generally no real way to find the right parameters or cutoff for the anomaly_score. If you have a list of anomalies you may be able to calculate recall and precision on that set. But thats rather rare.For trees: I would suspect that more is better but at some point the score should converge and more trees only cause more computation time.Best,Martin0
Answers
-
Hi,great to hear that we produce the same output as R. I am the author of it and I only compared to sklearn.I think generally no real way to find the right parameters or cutoff for the anomaly_score. If you have a list of anomalies you may be able to calculate recall and precision on that set. But thats rather rare.For trees: I would suspect that more is better but at some point the score should converge and more trees only cause more computation time.Best,Martin0
-
Thanks Martin. With my little sampling and testing I've found that tree count is less important than leaf size. Variations between 100 to 10,000 trees did little to change my results of top anomalies, but changing from a leaf size of 1 to 2, continually narrowed the top (meaning those with lowest scores) to a match with my R script. Leaf size in a decision tree is easy enough to understand, and you can see the result of playing with it in the visualization, but I don't understand what leaf size does in an Isolation Forest when the goal is finding anomalies and not distinctions (or impurities) in the decision making process. Can you shed some light on this? Thanks again.
0