-
-
Notifications
You must be signed in to change notification settings - Fork 26k
Add sample_weight
support for QuantileTransformer
when fit on dense data
#31147
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
base: main
Are you sure you want to change the base?
Add sample_weight
support for QuantileTransformer
when fit on dense data
#31147
Conversation
Thanks for the PR. Could you please instead use For the unweighted case, we should use The two changes together should help make the weighting/repetition semantic check of Please mark |
sample_weight
support for QuantileTransformer
when fit on dense data
Please also don't forget to document your change in a changelog entry by adding a file under |
@ogrisel Okay, thank you for your reply! I will fix that |
…rcentile, add XFAIL for sparse_data
Reference Issues/PRs
Fixes #30707
See also the discussion in #30707.
What does this implement/fix? Explain your changes.
This PR adds support for the
sample_weight
parameter toQuantileTransformer
, allowing users to apply weights to samples when computing quantiles. This makes the transformation more flexible, especially in cases where samples have varying importance or are part of imbalanced datasets.Changes made:
sample_weight
parameter tofit
and_dense_fit
.sample_weight
.Any other comments?
sample_weight
is not provided.Thanks for the review!