-
-
Notifications
You must be signed in to change notification settings - Fork 193
Laplace: Add mean argument to helper distributions #3210
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
base: develop
Are you sure you want to change the base?
Conversation
This example https://discourse.mc-stan.org/t/embedded-laplace-numerical-problem/39700 uses non-zero mean (mu) and Poisson. So with the helper it should look something like (not certain what is the argument order now)
|
Thanks @avehtari. Writing that test made me realize something else: The |
|
||
const int N = 1; | ||
const std::vector<int> y{153}; | ||
const std::vector<int> y_index{0}; |
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.
My instinct (and @avehtari's above) was to make this {1}
, but that led to an index-out-of-bounds, because this variable is used as a 0-based index. This comment is to remind me that I want to verify this is intentional
Summary
Closes #3202. Note that this is branched off of #3209, since doing the two changes independently would lead to a great many merge conflicts.
Tests
Existing tests updated to pass 0 as the mean. It would be nice to add some tests
with a non-zero mean, if there are suggestions (@avehtari @charlesm93)
Side Effects
Release notes
Checklist
Copyright holder: (fill in copyright holder information)
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