-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Add interpolation to _weighted_percentile (Addresses #6189) #7662
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
[MRG] Add interpolation to _weighted_percentile (Addresses #6189) #7662
Conversation
tests are failing |
Looked into it. One of the cases where it's failing is in The issue is the
when the weights are 0. What behavior is expected in this case? Uniform weighting? |
The other case where tests are failing involves The issue seems to be the interpolation is causing the result to be slightly different than the expected. This seems consistent with introducing interpolation -- e.g., consider the original example:
Originally, this returned 0. Now it returns 0.5. |
It seems like currently in the zero-weight case, the smallest value is chosen, i.e., if |
7b45cd9
to
b309f9e
Compare
@amueller Sorry for the 2 year delay! Should be ready to merge. |
b309f9e
to
6811f15
Compare
Arfff. It is only now that I am finding this PR. I am sorry I opened #17768 instead. |
@glemaitre No worries at all, and thanks! I'll close this PR in favor of yours. |
Reference Issue
Addresses #6189.
What does this implement/fix? Explain your changes.
It follows the Weighted Percentile method to implement interpolation in
_weighted_percentile
.Any other comments?
Changing and adding test cases currently.An example that this changes is