cmdstanr
cmdstanr copied to clipboard
Add finite-difference based hessian method
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