[Python-ideas] Adding quantile to the statistics module
Guido van Rossum
guido at python.org
Sat Mar 17 11:56:17 EDT 2018
Since Python is not held to backwards compatibility with S, and for most
datasets (and users) it doesn't matter much, why not ho with the default
recommended by Hyndman & Fan?
On Fri, Mar 16, 2018 at 11:48 PM, Nathaniel Smith <njs at pobox.com> wrote:
> On Fri, Mar 16, 2018 at 11:19 PM, Stephen J. Turnbull
> <turnbull.stephen.fw at u.tsukuba.ac.jp> wrote:
> > PLIQUE Guillaume writes:
> >
> > > That's really interesting. I did not know there were so many way to
> > > consider quantiles. Maybe we should indeed wait for numpy to take a
> > > decision on the matter and go with their default choice so we remain
> > > consistent with the ecosystem?
> >
> > The example of R with 9 variants baked into one function suggests that
> > numpy is unlikely to come up with a single "good" choice. If R's
> > default is to Steven's taste, I would say go with that for cross-
> > language consistency, and hope that numpy makes the same decision. In
> > fact, I would argue that numpy might very well make a decision for a
> > default that has nice mathematical properties, while the stdlib module
> > might very well prefer consistency with R's default since defaults
> > will be used in the same kind of "good enough for government work"
> > contexts in both languages.
>
> NumPy already has a default and supports a number of variants. I'd
> have to go digging to figure out which languages/tools use which
> methods and how those match to theoretical properties, but IIRC numpy,
> R, and matlab all have different defaults.
>
> The 9 types that R supports come from a well-known review article
> (Hyndman & Fan, 1996). Their docs note that Hyndman & Fan's
> recommendation is different from the default, because the default was
> chosen to match a previous package (S) before they read Hyndman & Fan.
> It's all a bit messy.
>
> None of this is to say that Python shouldn't have some way to compute
> quantiles, but unfortunately you're not going to find TOOWTDI.
>
> -n
>
> --
> Nathaniel J. Smith -- https://vorpus.org
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180317/796e77e6/attachment-0001.html>
More information about the Python-ideas
mailing list