-
-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoguide inference is incorrect for VonMises distribution #2740
Comments
You are right. In numpyro, we set the support to be [-pi, pi] but it raises another concern: when the posterior mode concentrates around |
Stereographic projection? https://math.stackexchange.com/questions/3916441/the-stereographic-projection-is-bijective |
I think the right solution is to (1) port Pyro's |
You're right that not every value maps, but it's just the origin. You end up going from K parameters to K + 1. This isn't the best paper but interesting concept https://arxiv.org/pdf/1712.07764.pdf. w_0^2 + ... + w_k^2 = 1 the inverse if f^-1(x_k) = S^2 - 1 / (S^2 + 1) if k = 0 where S^2 = sum(x^2) for all k Apparently there's this paper On geometric probability distributions Anyway, looks like you got it figured out. Cheers |
The
VonMises
distribution sets.support = constraints.real
but should really set something like aconstraints.circular
or other mod-2-pi constraint. This can be an issue in autoguides which fit a variational posterior of the generic formsince the ELBO's
q.entropy()
term can incorrectly diverge to infinity because it doesn't know about wrapping around 2 pi.I believe HMC inference should still be correct, although convergence diagnostic statistics may be incorrect if they don't wrap mod 2 pi.
Possible solution
While I don't know how to cleanly implement something like
transform_to(constraints.circular)
, the issue can be worked around by replacingVonMises
with aProjectedNormal
distribution and usingProjectedNormalReparam
during variational inference.The text was updated successfully, but these errors were encountered: