-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
Feature/3149 jacobian optimize #3152
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.
LGTM!
I missed this one earlier, too
It would be good to be explicit whether the MAP is in unconstrained or constrained space (as these are not in general the same) |
We compute the optimization in the unconstrained space using the Jacobian adjustment. We then map the posterior mode in the unconstrained space back to the constrained space. Then for the Laplace approximation, we map back from constrained to unconstrained, lay down the normal approximation in the unconstrained space (including Jacobian for the MAP option), sample from the approximate normal in the unconstrained space, and then inverse transform the draws back to the constrained space. |
Submission Checklist
./runTests.py src/test/unit
make cpplint
[can't figure out how to do this as it hardcodespython
and I need to usepython3
on Mac OS X and it doesn't seem to take aliases or a specification ofPYTHON2
environment variable]Summary
Add a template parameter to all optimization functions (Newton, BFGS, L-BFGS) to indicate whether or not to include Jacobian adjustments. Until now, we had hard coded turning the Jacobian off to provide maximum likelihood estimates. With the Jacobian turned on, we will now support an option for max a posteriori (MAP) estimates.
Intended Effect
Use MAP estimates in Laplace approximation.
How to Verify
Unit tests with a new model with the Jacobian calculated and optimized explicitly.
Side Effects
Shouldn't be any because I made it the last argument and gave it a default of
false
so that it falls back on existing behavior.Documentation
Yes, in code.
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Simons Foundation
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: