[SciPy-Dev] Donating code for robust statistical estimators

Ralf Gommers ralf.gommers at gmail.com
Tue Sep 3 01:45:43 EDT 2019


On Mon, Sep 2, 2019 at 1:45 PM Filippo Bovo <hi.hellbee at gmail.com> wrote:

> Hi,
>
> I wrote a Python package for the high-performance calculation of three
> robust statistical estimators: weighted median, medcouple and mode.
>
> The repository with the code is at this link:
> https://github.com/FilippoBovo/robustats.
>
> The estimators are implemented in C using linear or log-linear algorithms,
> thereby making the code run pretty fast.
>
> I would like to donate the code for the above three estimators to SciPy.
>

Hi Filippo. Thanks for your interest in contributing!

I believe that `scipy.stats` is a good location where to add the weighted
> median, medcouple and mode.
>

There is a mode function in scipy.stats. It looks nontrivial to make that
work in C in a backwards-compatible fashion, but please have a look at it
and see if that can work and would be an improvement.

I've looked at your medcouple, but the function doesn't explain what it's
for and I'm not familiar with the name. Can you explain?

A weighted median doesn't fit well. NumPy has a median function, perhaps
better to consider whether to add weights to that, in the same fashion as
for numpy.average

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20190902/666c1d7d/attachment.html>


More information about the SciPy-Dev mailing list