SciPy

scipy.optimize.BFGS

class scipy.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 BFGS result and the unmodified matrix. Both exceptions strategies are explained in [R099e42e82f60-1], p.536-537.

min_curvaturefloat

This number, scaled by a normalization factor, defines the minimum curvature dot(delta_grad, delta_x) allowed to go unaffected by the exception strategy. By default is equal to 1e-8 when exception_strategy = 'skip_update' and equal to 0.2 when exception_strategy = 'damp_update'.

init_scale{float, ‘auto’}

Matrix scale at first iteration. At the first iteration the Hessian matrix or its inverse will be initialized with init_scale*np.eye(n), where n is the problem dimension. Set it to ‘auto’ in order to use an automatic heuristic for choosing the initial scale. The heuristic is described in [R099e42e82f60-1], p.143. By default uses ‘auto’.

Notes

The update is based on the description in [R099e42e82f60-1], p.140.

References

R099e42e82f60-1(1,2,3)

Nocedal, Jorge, and Stephen J. Wright. “Numerical optimization” Second Edition (2006).

Methods

dot(self, p)

Compute the product of the internal matrix with the given vector.

get_matrix(self)

Return the current internal matrix.

initialize(self, n, approx_type)

Initialize internal matrix.

update(self, delta_x, delta_grad)

Update internal matrix.

Previous topic

scipy.optimize.Bounds

Next topic

scipy.optimize.BFGS.dot