Re: Basic spherical statistics in scipy

Daniel Schmitz via SciPy-Dev <[email protected]>
Newsgroups gmane.comp.python.scientific.devel
Message-ID <CALj43ZTOpgZk3E-HdyK70wDqdZkkjxTMscCK+C_=i9ennHRDzg@mail.gmail.com>
Hi SciPy,

I opened a PR for the Von-Mises Fisher distribution:
https://github.com/scipy/scipy/pull/17624

One thing needs more elaborate discussion: I added a fit method. So far, no
other multivariate distribution has a fit method, so the API potentially
sets a precedent.

Currently it is implemented as fit(data) and returns the two distribution
parameters `mu`, `kappa` . In principle, it is possible to also add the
possibility for the user to fix one of the parameters, similar to what can
be done with univariate distributions. If you have any thoughts on this,
please join the discussion in the PR.

Thanks!

Am Sa., 19. Nov. 2022 um 17:17 Uhr schrieb Robert Kern <
[email protected]>:

> On Sat, Nov 19, 2022 at 3:50 AM Daniel Schmitz <
> [email protected]> wrote:
>
>> Hi again everyone,
>>
>> the first milestones proposed here have been implemented:
>> - sampling from the hypersphere
>> - directional sample statistics (direction mean and mean resultant length)
>>
>> I would like to propose to further add the most commonly used analogue of
>> the normal distribution on the hypersphere: the von Mises-Fisher
>> distribution
>> <https://en.wikipedia.org/wiki/Von_Mises%E2%80%93Fisher_distribution> (vMF).
>> A reference implementations for sampling from it is available in
>> geomstats
>> <https://github.com/geomstats/geomstats/blob/f30c491a6da8cab38be48029d09eda2beec4defc/geomstats/geometry/hypersphere.py#L344> and
>> fitting and evaluating pdf/logpdf should not be too difficult to implement
>> by ourselves.
>>
>> Having worked with directional data a lot, I have seen many people
>> struggle with these distributions. I do not think that all kinds of
>> spherical distributions should become part of SciPy, but the vMF is so
>> fundamental that it would be very valuable to the general community.
>>
>
> I think that's reasonable.
>
> --
> Robert Kern
> _______________________________________________
> SciPy-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/scipy-dev.python.org/
> Member address: [email protected]
>

_______________________________________________
SciPy-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-dev.python.org/
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.