-
-
Notifications
You must be signed in to change notification settings - Fork 190
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 dirichlet_lpdf and multi_normal_cholesky_lpdf adjoints #2331
Fix dirichlet_lpdf and multi_normal_cholesky_lpdf adjoints #2331
Conversation
Yeah sure on my list. Good catch. |
wow! the last working version of the multivariate normal was in 2.24.1 ! Test, test, test, test... please, please, please :) |
…o added multi_normal tests for the same, but there was no bug) (Issue stan-dev#2332)
Edit: @rok-cesnovar gave me permissions so I pushed the changes here now. I originally added tests in the multi_normal thing too. I just left them cause it's not gonna hurt to have them. We'll need to add the ability to test these vectorized things in the varmat tests separately. |
…4.1 (tags/RELEASE_600/final)
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
@rok-cesnovar @SteveBronder ready for review (and this is a bugfix for the release) |
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.
Thanks to both!
Summary
Fixes a bug in
dirichlet_lpdf
andmulti_normal_cholesky_lpdf
, where some overloads (ones that do broadcasting) produced wrong derivatives. The bug appeared with generalizations of the functions, so it is also present in the last release.Tests
As far as I can see there is no test for
dirichlet_lpdf
that would check adjoints (ouch). Tests formulti_normal_cholesky_lpdf
seem as if they should catch that, but they are quite complicated and I can't really make sense of them.@bbbales2 can I recruit you for writing appropriate tests for this?
Side Effects
None.
Release notes
Fixed a bug in
dirichlet_lpdf
andmulti_normal_cholesky_lpdf
, where some overloads (ones that do broadcasting) produced wrong derivatives.Checklist
Math issue Vectorized versionf of dirichlet_lpdf and multi_normal_cholesky_lpdf broken #2332
Copyright holder: Tadej Ciglarič
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested