-
-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IsolationForest is breaking backward compatibility #11337
Comments
Hmm... I thought we managed to avoid changing too much current behaviour.
Apparently not.
|
One solution would be to actually change the value |
Using |
IsolationForest was not consistent with the other estimators as decision_function was not thresholded by default. See issue #8693. |
BTW in your snippet the |
Yep but this is does not solve the backward compatibility breakage which is my main concern here. Also, I have nothing against breaking it, but we should certainly mention it at least in the what's new and give a tip on how to change code then. WDYT? |
Yes I agree, this change should be better explained in the whatsnew. Concerning the tip to change the code, the example of IsolationForest has been updated accordingly and we can add a reference to it. |
Does this rather require a deprecation cycle? |
If the previous behaviour was not a bug, but merely a different API
convention, then yes, there should be deprecation...
|
I will open a PR. Unless a new contributor wants to take this one :). Thanks @glemaitre! |
This requires a bit more work than what I originally thought as we need to revert the examples involving the decision_function of IsolationForest so that they work with the 0.19 version. Some of the current outlier detection common tests will also not pass for the |
Maybe we should consider something as blunt as a parameter which switches old/new behaviour, to change default value in 0.22 and to be removed in 0.24.... |
I think that's a good idea. |
agreed
|
By preparing the scipy tutorial, I stumbled into a backward-compatibility breakage. It was introduced when the outlier detection methods have been improved.
The issue is with the following code:
So it seems that now we need to had the
threshold_
(or later on theoffset_
) to the score given by the decision function.Results in 0.19
Results in master
Where we are of this breakage? I could not find it in the What's New.
ping @jnothman @ngoix @albertcthomas
The text was updated successfully, but these errors were encountered: