FilippoBovo / robustats

Robustats is a Python library for high-performance computation of robust statistical estimators.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weighted percentile/quantile?

ctchervenkov opened this issue · comments

Given that the mean is just the 50% percentile, would it not be simple to extend the implementation to allow the computation of weighted percentiles?

Do you mean median? If so, yes, it should not be that hard to extend the function. However, I will not have the laptop with me for a while, so I won’t be able to work on it.

If you’d like to give it a shot, this is the function that you have to modify. It should be enough to change lines 54, 67 and 72 by substituting 0.5 with a percentile value between 0 and 1. If you can make it work, could you please open a pull request?