-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix Wishart and InverseWishart #84
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I haven't really checked the changes closely next to Distributions.jl but this PR seems to pretty much just rename -c0
to logc0
. I don't quite understand how that makes sense from a mathematical point of view. Are you sure this is correct?
Yes, and a fix of the variance computation, it was incorrect before. The test error with Zygote is due to the |
I guess the name |
Sorry! I suppose I'm to blame for these changes. A density is kernel x normalizing constant, which you can write either as (i) f(x) = c₀⋅k(x) or (ii) f(x) = k(x) / Z₀. Doesn't matter which you pick as long as you pick one. The 5 other matrix-variate distributions went with (i) but the While we're at it (and re this), I am curious why these distributions have to be line-for-line recoded here. Is it the use of |
I haven't implemented the version in DistributionsAD (just trying to fix it), but yes, it seems, that the major difference is that |
For Zygote, we need to avoid stuff that break Zygote like try-catch, so we re-implement the function avoiding those things that break Zygote. PDMats also causes issues when trying to differentiate wrt the random variable for almost all AD backends. So we have TuringX distributions which avoid PDMats. This is also true for TuringDenseMvNormal. |
CI failure seems to be unrelated, the test was cancelled without any test failures. |
Thanks @devmotion ! |
Is it OK to make a new release with this fix (it seems it should be a breaking 0.6 release)? Then we could remove all these temporary fixes in the downstream packages. |
Sure, sounds good. |
Thanks! |
No description provided.