OEBFGSOpt

Attention

This API is currently available in C++ and Python.

class OEBFGSOpt : public OEOptimizer1

The OEBFGSOpt implements the quasi-Newton optimization method with updating Hessian according to the scheme of Broyden, Fletcher, Goldfarb and Shanno. The convergence criteria in based on \(\sum_i {g_ig_i}\).

The following methods are publicly inherited from OEOptimizer1:
The OEBFGSOpt class defines the following public methods:

Constructors

OEBFGSOpt() -> OEBFGSOpt
OEBFGSOpt(arg2: OEBFGSOpt) -> OEBFGSOpt

Default and copy constructors.

GetHessianDimension

GetHessianDimension() -> int

Returns the dimension of the Hessian matrix.

GetInverseHessian

GetInverseHessian(h: OEDoubleArray, nv: int) -> bool

Copies the inverted Hessian matrix into the array h in the form of lower triangle of complete Hessian. This function is useful when the Hessian matrix generated during optimization is needed. nv is the number of optimized variables.

GetKeepHessian

GetKeepHessian() -> bool

Returns true if the OEBFGSOpt object is set to keep its Hessian

SetKeepHessian

SetKeepHessian(keep: bool) -> None

If the value of the argument passed is true, the OEBFGSOpt object will keep its Hessian when the optimization is done.

UseSavedHessian

UseSavedHessian(ini: bool) -> None

By default, at the start of the optimization Hessian is initiated as unit matrix. In the case when optimization has to repeated, for example starting with different values of variables, one can use this method to initiate optimization with the Hessian from the previous run.