-
-
Notifications
You must be signed in to change notification settings - Fork 26k
[WIP] Correct ducktyping of predict proba in GridSearchCV #4909
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
[WIP] Correct ducktyping of predict proba in GridSearchCV #4909
Conversation
Selfnote: Needs to be patched to #4294 |
Ah! This is interesting... So we need it to delegate to either |
Maybe we should ignore the issue with people searching over
The first one is a bit more magic and I don't really see it as being very necessary. If people set |
So I vote for 2. |
Unless I'm missing something, that example I provided should always have |
@adammenges The example you provided is fine! This is an issue with delegation of the meta-estimator ( |
And Andreas was talking about setting probability to |
I've not the time to read all comments right now, but this is the wrong solution. We need to check the unfitted estimator and delegate to the fitted one. |
Fixes #4902
The decorator (used for ducktyping) was set to
'estimator'
(the unfitted est.) rather than the final'best_estimator_'
at #3982And so
predict_proba_
checked for the attrprobA_
in theestimator
instead ofbest_estimator_
...Also we need to make sure
NotFittedError
gets raised first sinceestimator
is not fitted...@agramfort @adammenges Please take a look!