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
Implement StickBreakingTransform.log_abs_det_jacobian() #112
Comments
This is being implemented in pytorch#5547 |
This was implemented in pytorch#5547 but may be buggy and does not work. We should add tests and fix the bugs. @alshedivat Have you used EDIT sorry, I'm not sure where my bugs are, and they may not be in this function. But I would feel more confident if we had some tests for this function 🙂 |
@fritzo, my implementation is based on Stan's reference manual, v2.17.0 (Section 35.6, pp. 408-410) and uses the inverted stick-breaking construction. I also used an offset as suggested in the manual to make sure all zeros vector maps to the center of the simplex. I have used Note: The original implementation of the Edward uses the same construction in their @dustinvtran, do you happen to know a good way to test |
@alshedivat Thanks for explaining. @ssnl pointed out that we could use torch.slogdet, but we would need to deal with the Jacobian not being square. |
Thanks for pinging me. We haven't implemented and tested a |
This is needed to do HMC over simplex-constrained random variables, e.g. for
Dirichlet
random variables.It would really help to have tests #110 complete to test correctness of this tricky bit of math.
The text was updated successfully, but these errors were encountered: