Open ivanistheone opened 9 months ago
In case anyone is using this library with PyMC v4 or v5, note the need to "un-transform" the variables before computing the Hessian, otherwise the uncertainty of the estimates will be incorrect.
I read about this problem here: https://github.com/pymc-devs/pymc/issues/5443#issuecomment-1030609090
Applying the fix to the quap function looks like this: https://github.com/ivanistheone/pymc_Rethinking_3/commit/0f498e7abbb43d41999f5e0a1aba416c066d2ce3
quap
Note this is not an issue in PyMC3 since the find_MAP and find_hessian are both base don un-transformed coordinates.
find_MAP
find_hessian
I'd be happy to submit a PR with this fix, though not sure how to make the code compatible with both PyMC3 and PyMC4+.
In case anyone is using this library with PyMC v4 or v5, note the need to "un-transform" the variables before computing the Hessian, otherwise the uncertainty of the estimates will be incorrect.
I read about this problem here: https://github.com/pymc-devs/pymc/issues/5443#issuecomment-1030609090
Applying the fix to the
quap
function looks like this: https://github.com/ivanistheone/pymc_Rethinking_3/commit/0f498e7abbb43d41999f5e0a1aba416c066d2ce3Note this is not an issue in PyMC3 since the
find_MAP
andfind_hessian
are both base don un-transformed coordinates.I'd be happy to submit a PR with this fix, though not sure how to make the code compatible with both PyMC3 and PyMC4+.