cmdstanr icon indicating copy to clipboard operation
cmdstanr copied to clipboard

Add finite-difference based hessian method

Open andrjohns opened this issue 3 years ago • 0 comments

For instances where the compilation of the hessian() method fails due to fvar<T> compatibility issues in the Math library (as seen here), it would be good to offer an alternative method based on finite-differencing. Possibly also with a warning/message that the finite-diff method will be slower and less precise than the autodiff.

For the interface, I was thinking of introducing this as a separate method, like hessian_finite() or similar rather than an option to the existing hessian() method. @jgabry any thoughts? I'm not particularly married to any kind of approach here

andrjohns avatar Dec 12 '22 15:12 andrjohns