pythonscipyscipy-optimize-minimizenewtons-methodconvex-optimization

Using Preconditioners in scipy.minimize


Can I use Jacobi Preconditioning for the inner CG step in Truncated Newton Conjugate implementation of scipy?

The options for the TNC solver do not include any support for preconditioning. I'm guessing it is not possible to view the condition number of the Hessian too.


Solution

  • I don't believe so. You can see the code which initializes the preconditioner here, and it does not call any kind of user-provided callback to allow you to substitute your own preconditioner.

    I'm guessing it is not possible to view the condition number of the Hessian too.

    There isn't support for that, and adding that support would be complicated by the fact that the code does not explicitly calculate or store the Hessian, as that is expensive for problems with a large number of variables. Instead, it uses a finite difference based method to approximate the product of the Hessian with a vector. You can see that here.