-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
RFE/RFECV doesn't work with sample weights #7308
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
yeah I think you can open a PR for that. You need to add tests, though. |
Note that testing for sample weights usually involves checking that weights On 1 September 2016 at 03:33, Andreas Mueller [email protected]
|
Great, want to assign this to me @amueller? I'll sort out a PR with tests. |
We don't use the "assignee" feature much, and for some reason it's not letting me assign. Go ahead and open a PR, reference this issue, then ping one of us after we've released 0.18: it's not likely to be looked at before then. |
you can only "assign" contributors |
Hey all, just an FIY, @ijpulidos and I worked on this over #20380 |
@fbidu thank you so much for this! for what it's worth I think it would be fairly simple to add this also to RFECV (which just calls RFE), but I understand if that's outside of the scope of what you're working on (since you're already building/trying to merge) |
@nathanwalker-sp you're welcome! Well, I agree with you and sure enough should be a simple change, but I'm not familiar with the practices adopted by this project to track these. @glemaitre as the reviewer for my PR, what do you think? May I just go ahead and implement this there or is it better if we first merge #20380 and then create a new issue/PR pair to track RFECV? |
@nathanwalker-sp yeah, @glemaitre already merged it. Can you please create a new issue referring back to this in order to track RFECV? |
I am reopening this issue and will rename the title. Feel free to open a new PR. |
Hello, |
@max-franceschi metadata routing need to be implemented for the CV. Check #22893 |
As far as I can tell,
sklearn.feature_selection.RFE
has no way to pass sample weights to the estimator alongside the data.I have fixed this in my code with:
Would this be a worthwhile contribution to scikit-learn?
Versions
TODO:
sample_weight
inRFE
sample_weight
inRFECV
The text was updated successfully, but these errors were encountered: