-
Notifications
You must be signed in to change notification settings - Fork 78
Allow parsing jacobian=False to find_MAP #641
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: main
Are you sure you want to change the base?
Allow parsing jacobian=False to find_MAP #641
Conversation
jacobian=False is the behavior of pymc.find_MAP
|
I'd also like to know why pymc_extras choose to include jacobian term while pymc explicitly exlcude jacobian term in https://github.com/pymc-devs/pymc/blob/24e9f4974b2c74528b032659e80367003ad30141/pymc/tuning/starting.py#L150 |
|
We shouldn't have a flag for this, there should just be a correct answer. I believe MAP function in main PyMC is incorrect. The change of variables is not a "sampling only" thing, and the correction terms are not constant offsets that "drop out" when doing optimization. To get the correct logp expression, they need to be included. |
|
Isn't it a question of optimizing the user defined model instead of whatever unconstraining parametrization pymc uses for logp graphs? That is |
|
No because you're still transforming the variables. Maybe I misunderstand something. |
|
Yes but you get the result you would by optimizing the constrained model. The change of variables becomes simply a trick for scipy to optimize without finding boundary issues? |
I worked through a simple example on paper and I now think you are right and I am wrong. The extras implementation should have |
Yes, that's why I'd like to use find_MAP with The only thing I'm not certain is whether the MAP of transformed space is useful or not. Can it serve as a better starting points for NUTS? If it has some value, then maybe we should keep a flag. |
|
You just can change the flag to False in this PR without adding an argument and we can merge it once tests pass |
I have been wanting to add a little tool to make regression table outputs from MAP, like what you get from statsmodels (probably use their reporting code directly). If you're interested in working on that I'd be happy to help :) |
| jacobian : bool, optional | ||
| Whether to include jacobian terms in logprob graph. Defaults to True. |
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.
| jacobian : bool, optional | |
| Whether to include jacobian terms in logprob graph. Defaults to True. |
Co-authored-by: Jesse Grabowski <48652735+jessegrabowski@users.noreply.github.com>
dec1347 to
5b4574d
Compare
jacobian=False is the behavior of pymc.find_MAP