question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Isolation Forest results do not match in sklearn 0.21.3

See original GitHub issue

To reproduce: run isolation forest tests with scikit-learn==0.21.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
zhanjiezhucommented, Sep 1, 2020

I can reproduce this, it only throws errors on “predict” but fine for “decision_function” and “score_samples”, so must be problem with the offset in “predict”. It’s due to in 0.21.3, the “behaviour” defaults to “old”, which cause the “predict” rely on the value “threshold” which is already removed in 0.22 onwards. To make it also work for 0.21.3, I think we can try to parse the threshold if exist, otherwise set 0.

0reactions
ksaurcommented, Sep 3, 2020

We would love to have your help, thanks! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

sklearn.ensemble.IsolationForest
Isolation Forest Algorithm. Return the anomaly score of each sample using the IsolationForest algorithm. The IsolationForest 'isolates' observations by randomly ...
Read more >
Average path length in iForest is inaccurate for small sizes
IsolationForest ) gives quite inaccurate results for small sizes ... which is equal to the average path length of an unsuccessful BST search ......
Read more >
No matching distribution found for Install - scikit learn
I know this is an old post, but this same issue kept bugging me for a long time so sharing this in case...
Read more >
Isolation Forest and Spark - Towards Data Science
With the estimation of the average path length in the whole forest, we can deduce whether a point is anomalous or not. If...
Read more >
incorrect results of IsolationForest - Cross Validated
Contamination in isolation forest is basically a hyperparameter. It is used to pick the threshold for the score to distinguish anomalies ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found