yixuan / LBFGSpp

A header-only C++ library for L-BFGS and L-BFGS-B algorithms
https://lbfgspp.statr.me/
MIT License
532 stars 101 forks source link

Allow to use symbolic Hessian #11

Closed cryoff closed 2 years ago

cryoff commented 4 years ago

Hello! It is an awesome library, thank you!

I have one question - do you plan to support an option to use a symbolic (so, not numerically approximated) Hessian? I have some small-scale problem which requires high accuracy and therefore the symbolic Hessian suits better than numerical one.

yixuan commented 4 years ago

L-BFGS is a quasi-Newton method, meaning that it does not require an exact Hessian matrix. If you have access to the Hessian matrix, then you can directly apply the Newton's method.