rfeinman / pytorch-minimize

Newton and Quasi-Newton optimization with PyTorch
https://pytorch-minimize.readthedocs.io
MIT License
292 stars 34 forks source link

Is it possible to return the inverse-Hessian matrix as well? #2

Closed zizhongyan closed 2 years ago

zizhongyan commented 2 years ago

Hi, Thanks a lot for your very nice & useful package.

I see the minimize function returns the eventual value of the objective function and the minimal. Since I am going to use your package to perform the MLE, finding the approximated variance estimator would be quite helpful. Hence, I was wondering whether pytorch.minimize could return also the inverse Hessian matrix as what scipy's optimize.minimize would give.

Many thanks.

rfeinman commented 2 years ago

Added for methods "bfgs" and "newton-exact" in af35a9f845e9fc99aefe982194b128b3fd6132e9.

Thanks for the suggestion!