Closed ghutchis closed 1 year ago
To understand this issue. In
you can pass a complete function state including an initial guess of the hessian
to the solver. This is automatically done for your function evaluation.
Note, most solver store the inverse of the Hessian. I don't know at the moment of how one would adapt the function_state_t
to set that (inverse) value as other solvers like LBFGS do not even use the inverse Hessian in a direct way.
If there is a neat way to initialize the (inverse) Hessian with a good guess I am more than happy to merge it in.
Let me think if there's a good way to directly write the inverse guess (i.e., it's generally sparse but inverting a big Hessian is still slow).
I can think of a few ML-based methods to predict the inverse Hessian, but it's probably too much trouble. As you said, it's better to use something like LBFGS and then the inverse isn't even used directly.
Many times in chemistry, we can supply a quick approximate Hessian to start the optimization. It's an improvement over using the identity matrix to start for our applications.
I can certainly patch the
ISolver
class to capture an H matrix from the user or default toTHessian::Identity(DIM, DIM)
Would you be okay with a pull request (to
master
) for this?