-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Add sample_weight support to QuantileTransformer #30707
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
Searching in the issue tracker, looks like this feature is in scope if I understand correctly #20522 (comment). cc @snath-xoc and @jeremiedbb for an informed opinion, since they have been working on sample weights support recently. |
@antipisa would you be interested in contributing a PR? There is already a common test named
You might want to adjust some non-default parameter values for that check in Note that when subsampling is enabled, we need to follow a similar strategy as implemented in We are working on tooling to help test the case where the estimator's |
I will take this! |
Describe the workflow you want to enable
Would be good to get sample_weight support for QuantileTransformer for dealing with sparse or imbalanced data, a la #15601.
Describe your proposed solution
As far as I know it would just require adding the weight argument to the quantiles_ computation in np.nanpercentile.
KBinsDiscretizer
supports sample_weight and with strategy='quantile', encode='ordinal' this behavior can be achieved but it is much, much slower.Describe alternatives you've considered, if relevant
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: