scipy.optimize.HessianUpdateStrategy¶

class
scipy.optimize.
HessianUpdateStrategy
[source]¶ Interface for implementing Hessian update strategies.
Many optimization methods make use of Hessian (or inverse Hessian) approximations, such as the quasiNewton methods BFGS, SR1, LBFGS. Some of these approximations, however, do not actually need to store the entire matrix or can compute the internal matrix product with a given vector in a very efficiently manner. This class serves as an abstract interface between the optimization algorithm and the quasiNewton update strategies, giving freedom of implementation to store and update the internal matrix as efficiently as possible. Different choices of initialization and update procedure will result in different quasiNewton strategies.
Four methods should be implemented in derived classes:
initialize
,update
,dot
andget_matrix
.Notes
Any instance of a class that implements this interface, can be accepted by the method
minimize
and used by the compatible solvers to approximate the Hessian (or inverse Hessian) used by the optimization algorithms.Methods
dot
(p)Compute the product of the internal matrix with the given vector.
Return current internal matrix.
initialize
(n, approx_type)Initialize internal matrix.
update
(delta_x, delta_grad)Update internal matrix.