[SciPy-Dev] Deprecate planck distribution?

Robert Kern robert.kern at gmail.com
Sat Jan 5 02:54:18 EST 2019


On Fri, Jan 4, 2019 at 11:09 PM Christoph Baumgarten <
christoph.baumgarten at gmail.com> wrote:

> My main concern about planck is that I am not aware that this is a known
> distribution name. I found Planck's law (
> https://en.wikipedia.org/wiki/Planck%27s_law) but I don't recognize the
> distribution implemented in SciPy.
>

I believe if you work out the details, you derive the spectral energy
density distribution known as Planck's Law from the underlying geometric
particle-count distributions of particles at each frequency.


> Does anyone know the distribution under that name?
>

Travis did:
https://github.com/scipy/scipy/commit/f1ad8198f2e967a8ca109d4f98f2bfe550b593a4

Here's one recent use (though I strongly expect that they picked up on the
name because of scipy rather than independently knowing it under that name)
(and on the gripping hand, still indicates a use in the wild that would be
real code breakage if we removed it):

  https://ieeexplore.ieee.org/abstract/document/8052152


> It is also called discrete exponential in scipy: normally, the geometric
> distribution is called the discrete analogue of the exponential (no memory
> property), so this could be confusing for users.
>

That said, the `planck` parameterization is more related to the (canonical
parameterization of the) continuous exponential distribution than the
`geom` parameterization. It's worth noting the relationship in both of
those docstrings, though.

The implementation of geom in SciPy is based on geometric in NumPy, my
> guess is that it has a better sampling method than the one of planck based
> on the ppf.
>

Indeed, since there is an equivalence, there is the opportunity for a more
direct implementation of `_rvs()`.


> We can also leave the different parametrization in stats and explain it in
> the docstring.
>

I would prefer this.

-- 
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20190104/b2488918/attachment.html>


More information about the SciPy-Dev mailing list