You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to compute the Fisher Information of my posterior, to obtain the quadratic approximation of my model. I need the hessian to do this, but can't seem to get it with cmdstanpy
Description:
I can't find anywhere in the docs how you can extract this throught the cmdstan interface. However, this functionality is available through the rstan. You simply put hessian=TRUE. cmdstanpy doesn't appear to have an equivalent way of doing this that I can see after perusing the source (maybe I missed it? Please enlighten if so). If it's not currently available, is there any simple work around to extracting this with cmdstanpy?
Current Version:
cmdstan: (2, 30)
cmdstanpy: 1.0.8
The text was updated successfully, but these errors were encountered:
There is no way to get this information from a CmdStan model currently. The next version of CmdStan (2.31) and CmdStanPy (1.1) will support the ability to calculate a gradient (#637), and you could numerically differentiate that function if desired. This is equivalent to what RStan does, but the overhead will be higher.
Alternatively, more developer focused tools like BridgeStan may be interesting to you. Currently this will also just be finite differences for the Hessian (though with significantly lower overhead), but in the future it will suport nested autodiff for many models
Given that we only produce gradients for the input values, it'd be a real pain to use CmdStan to calculate Hessians by finite differences over the gradients as that requires an epsilon offset on each dimension of the input.
BridgeStan is definitely the way to go for this. BridgeStan uses central finite diffs for more accuracy, but it's even more evaluations.
Summary:
I'd like to compute the Fisher Information of my posterior, to obtain the quadratic approximation of my model. I need the hessian to do this, but can't seem to get it with cmdstanpy
Description:
I can't find anywhere in the docs how you can extract this throught the cmdstan interface. However, this functionality is available through the rstan. You simply put hessian=TRUE. cmdstanpy doesn't appear to have an equivalent way of doing this that I can see after perusing the source (maybe I missed it? Please enlighten if so). If it's not currently available, is there any simple work around to extracting this with cmdstanpy?
Current Version:
cmdstan: (2, 30)
cmdstanpy: 1.0.8
The text was updated successfully, but these errors were encountered: