-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
feat: Support sample weight for MLP #25646
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
Conversation
da3b30b
to
6363d29
Compare
Hi @jnothman @dorcoh @thomasjpfan, moving the comment #11723 (comment) here... Could you please review this PR to add sample weight support for MLP as the prerequisite for adding class weight support? (I am working on another PR to support class weight #25326) |
9a66842
to
492c906
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I left a review, but I do not have the bandwidth to quickly follow up.
c9fa4ad
to
bfd035c
Compare
95b07e6
to
698c9ce
Compare
698c9ce
to
6159492
Compare
6159492
to
e2ff6b7
Compare
The MLP classes in scikit-learn are mostly for educational purposes. Do we want to introduce sample weights here, which also introduces more maintenance burden? We have mostly decided not to add features to the MLP classes in the past. |
0fc896f
to
1bfee0f
Compare
Good to know that MLP is mostly for educational purposes in scikit-learn. Then it makes sense to not add additional features in MLP here. I planned to add class weight support as well, but I think I will skip it. The implementation here to support sample weight is pretty straightforward and clean, so I hope it doesn't introduce more maintenance burdens. And I think it will be a useful feature even just for educational purposes. I have addressed previous comments and enhanced the implementation and test cases for this PR. Do you think we can move forward with it? |
Hi @thomasjpfan, thanks a lot for your comments! I have addressed most of your comments. Could you retake a look at this PR? Thanks. |
I would really love to have this feature in scikit learn! |
@scikit-learn/core-devs what do we think here? It's in a nice state, do we want to get it to the finish line or close? |
+1 |
I think it makes sense since #9113 is the most upvoted issue. |
I think it might be a good idea to complete this given that considerable work has been put in. |
@zshu115x are you still interested in working on driving this PR home? |
be0f76d
to
ac08865
Compare
@zshu115x First of all, I'm really grateful for your work on this PR. Don't get the wrong impression. Then, with the approaching 1.6 release, I thought it would good to have this feature and because of a few months of silence (no reason to appologize), I opened my PR where I took a lot from this PR! Then on the matter of regularization:
I close here as I don't think it is fruitful to discuss any further. |
Reference Issues/PRs
sample_weight support will contributes to class_weight support, so this PR contributes to the issue #9113, and the stalled PR #11723
What does this implement/fix? Explain your changes.
Add sample_weight support for MLP
Any other comments?
I have a draft PR #25326 to support class weight for MLP which will depend on this PR for sample weight support first.