-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
CalibratedClassifierCV doesn't support groups parameter in fit method #12052
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
Comments
This is I guess another example of what could potentially be solved by PR #9566. You can check issues #11429 and #4497 for more detailed discussion on the matter. Developers are mostly busy with In the meantime, you can check the answer I gave to the question "sklearn GridSearchCV not using sample_weight in score function" on stackoverflow useful. I haven't applied it to |
Do you know if there's been any progress on sample property routing PR #7646 (i.e., passing groups to fit functions)? My dilemma has been with GroupShuffleSplit and cross_val_score, but it seems these issues are one and the same. I tried adapting the answer you (Adrin) provided to GroupShuffleSplit, but my ability to do so is limited at best. Thus, I'm wondering if Ian found/created a successful workaround or if there's another thread/answer I've been missing. Thanks in advance! |
Since then scikit-learn/enhancement_proposals#16 has started, and we've had long discussions about this. It is moving forward, but slowly. |
Very slowly, unfortunately. I do hope to get back to it, but there's a
lot going on for me atm.
|
For anyone else that runs into this same issue before SLEP006 is finished, I've uploaded a very simple fix based on version 0.24.1 of sklearn here. This works the same was a |
Closing this since we have now metadata routing for |
Description
With classes like
sklearn.model_selection.GridSearchCV
and evenskopt.BayesSearchCV
they take acv
parameter that can be any object that produces train/test splits. In the case of usingsklearn.model_selection.GroupKFold
as thecv
object, it requires agroups
variable to be passed tofit
. In both these classes, they allowgroups
to be passed tofit
that's then passed to the underlyingGroupKFold
. However,sklearn.calibration.CalibratedClassifierCV
doesn't allow thegroups
variable tofit
even though it says it accepts anycv
object.The text was updated successfully, but these errors were encountered: