Class BFGSUpdater
java.lang.Object
org.hipparchus.optim.nonlinear.vector.constrained.BFGSUpdater
BFGS Hessian updater with dynamic damping and robustness improvements.
Manages Hessian updates for SQP solvers by:
- Checking curvature condition
- Applying dynamic damping if necessary
- Skipping update if curvature still fails after damping
- Soft regularization of diagonal entries on repeated failures
- Automatic Hessian reset after configurable failures
- Since:
- 4.1
-
Constructor Summary
ConstructorsConstructorDescriptionBFGSUpdater(RealMatrix initialHess, double eps, boolean autoScale, double decompositionEpsilon) Creates a new updater. -
Method Summary
Modifier and TypeMethodDescriptionReturns the current Hessian matrix H = L·Lᵀ.getL()Returns the current lower-triangular Cholesky factor L.voidResets the Hessian approximation to its initial value.voidresetHessian(double gamma) Resets the Hessian approximation with information on the curvature.voidResets the Hessian approximation with information on the curvature for external usageintupdate(RealVector s, RealVector y1) Updates the Hessian approximation using the BFGS formula.
-
Constructor Details
-
BFGSUpdater
public BFGSUpdater(RealMatrix initialHess, double eps, boolean autoScale, double decompositionEpsilon) Creates a new updater.- Parameters:
initialHess- initial positive‐definite Hessian matrixeps- treshold to apply auto scale sty < sqrt(eps)autoScale- true apply auto hessian rescalingdecompositionEpsilon- tolerance for symmetric matrices decomposition
-
-
Method Details
-
getHessian
Returns the current Hessian matrix H = L·Lᵀ.- Returns:
- current Hessian
-
update
Updates the Hessian approximation using the BFGS formula.If curvature condition fails, applies damping or regularization.
- Parameters:
s- displacement vector (xk+1 − xk)y1- gradient difference (∇fk+1 − ∇fk)- Returns:
- type of update:
- 0: update is done
- 1: sHs not positive (zero step), Hessian reset to identity
- 2: sty not positive even after damping (non-finite input), skipped update
- 3: downdate would lose positive definiteness, Hessian reset to factor*I
-
resetHessian
public void resetHessian()Resets the Hessian approximation to its initial value. -
resetHessian
public void resetHessian(double gamma) Resets the Hessian approximation with information on the curvature.- Parameters:
gamma- scale factor
-
resetHessianFactor
public void resetHessianFactor()Resets the Hessian approximation with information on the curvature for external usage -
getL
Returns the current lower-triangular Cholesky factor L.- Returns:
- current lower-triangular Cholesky factor
-