Open yang-song opened 5 years ago
cc: @alicanb
cc @ahmadsalim and https://github.com/pyro-ppl/pyro/pull/1729
I will try to push it upstream when I have time, which hopefully is soon 😄
Hello, any progress on adding von Mises-Fisher distribution for higher dimension? Thanks.
@xqding I have a PR with some code in Pyro that you may reuse: https://github.com/pyro-ppl/pyro/pull/1745 . I had some issues with testing which I still have to resolve, but the distribution in the PR should work reasonably if you want to use it now 😄
@ahmadsalim Thanks. Does it work for high dimensional (> 5) von Mises-Fisher distribution? I read it a bit and it seems it only works on 3D. Or am I missing something?
It only works with 3D currently. I have not been working on higher dimensional cases, but they probably can be based of the same distribution with slight modification 😄
Is there an update on this issue? I found that tfp
has this distribution implemented https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/VonMisesFisher#mean
🚀 Feature
There should be a von Mises-Fisher distribution in torch.distributions.
Motivation
It is very important to have those directional distributions when you want to do research related to directional statistics for machine learning. For example, von Mises-Fisher will be very useful for modeling unit length vectors. See paper https://arxiv.org/pdf/1804.00891.pdf
Additional context
TensorFlow has the von Mises-Fisher distribution. https://github.com/tensorflow/tensorflow/issues/6141
Here is also an implementation of von Mises-Fisher in pytorch (using scipy, without GPU support) https://github.com/nicola-decao/s-vae-pytorch/tree/master/hyperspherical_vae/distributions
cc @vincentqb @fritzo @neerajprad @alicanb @vishwakftw