Alex Rogozhnikov
2016-03-01 23:03:45 UTC
Hi,
I know the topic was already raised a long ago:
https://mail.scipy.org/pipermail/numpy-discussion/2010-July/051851.html
There are also several questions on SO:
http://stackoverflow.com/questions/20601872/numpy-or-scipy-to-calculate-weighted-median
http://stackoverflow.com/questions/13546146/percentile-calculation-with-weighted-data
http://stackoverflow.com/questions/26102867/python-weighted-median-algorithm-with-pandas
The only working solution with numpy:
http://stackoverflow.com/questions/21844024/weighted-percentile-using-numpy
uses sorting.
Are there better options at the moment (numpy/scipy/pandas)?
Cheers,
Alex.
I know the topic was already raised a long ago:
https://mail.scipy.org/pipermail/numpy-discussion/2010-July/051851.html
There are also several questions on SO:
http://stackoverflow.com/questions/20601872/numpy-or-scipy-to-calculate-weighted-median
http://stackoverflow.com/questions/13546146/percentile-calculation-with-weighted-data
http://stackoverflow.com/questions/26102867/python-weighted-median-algorithm-with-pandas
The only working solution with numpy:
http://stackoverflow.com/questions/21844024/weighted-percentile-using-numpy
uses sorting.
Are there better options at the moment (numpy/scipy/pandas)?
Cheers,
Alex.