BFGS#
- classscipy.optimize.BFGS(exception_strategy='skip_update',min_curvature=None,init_scale='auto')[source]#
Broyden-Fletcher-Goldfarb-Shanno (BFGS) Hessian update strategy.
- Parameters:
- exception_strategy{‘skip_update’, ‘damp_update’}, optional
Define how to proceed when the curvature condition is violated.Set it to ‘skip_update’ to just skip the update. Or, alternatively,set it to ‘damp_update’ to interpolate between the actual BFGSresult and the unmodified matrix. Both exceptions strategiesare explained in[1], p.536-537.
- min_curvaturefloat
This number, scaled by a normalization factor, defines theminimum curvature
dot(delta_grad,delta_x)allowed to gounaffected by the exception strategy. By default is equal to1e-8 whenexception_strategy='skip_update'and equalto 0.2 whenexception_strategy='damp_update'.- init_scale{float, np.array, ‘auto’}
This parameter can be used to initialize the Hessian or itsinverse. When a float is given, the relevant array is initializedto
np.eye(n)*init_scale, wherenis the problem dimension.Alternatively, if a precisely(n,n)shaped, symmetric array is given,this array will be used. Otherwise an error is generated.Set it to ‘auto’ in order to use an automatic heuristic for choosingthe initial scale. The heuristic is described in[1], p.143.The default is ‘auto’.
Methods
dot(p)Compute the product of the internal matrix with the given vector.
Return the current internal matrix.
initialize(n, approx_type)Initialize internal matrix.
update(delta_x, delta_grad)Update internal matrix.
Notes
The update is based on the description in[1], p.140.
References