# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.multivariate.unconstrained.c2.quasinewton

## Class BFGSMinimizer

• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
protected class  BFGSMinimizer.BFGSImpl
an implementation of the BFGS algorithm
• ### Nested classes/interfaces inherited from class com.numericalmethod.suanshu.optimization.multivariate.unconstrained.c2.quasinewton.QuasiNewtonMinimizer

QuasiNewtonMinimizer.QuasiNewtonImpl
• ### Nested classes/interfaces inherited from class com.numericalmethod.suanshu.optimization.multivariate.unconstrained.c2.steepestdescent.SteepestDescentMinimizer

SteepestDescentMinimizer.SteepestDescentImpl

• ### Fields inherited from class com.numericalmethod.suanshu.optimization.multivariate.unconstrained.c2.steepestdescent.SteepestDescentMinimizer

epsilon, maxIterations
• ### Constructor Summary

Constructors
Constructor and Description
BFGSMinimizer(boolean isFletcherSwitch, double epsilon, int maxIterations)
Construct a multivariate minimizer using the BFGS method.
• ### Method Summary

All Methods
Modifier and Type Method and Description
static Matrix dampedBFGSHessianUpdate(Matrix H, Vector gamma, Vector delta)
Damped BFGS Hessian update.
IterativeSolution<Vector> solve(C2OptimProblem problem)
Solve a minimization problem with a C2 objective function.
static Matrix updateHessianInverse1(Matrix S, Matrix gamma, Matrix delta)
Sk+1 = Sk + (1 + γ'Sγ/γ'δ)/γ'δ * δδ' -(δγ'S + Sγδ') / γ'δ, where S = H-1
static Matrix updateHessianInverse2(Matrix S, Matrix gamma, Matrix delta)
P + γγ' / γ'δ - P %*% γγ' %*% P / γ'Pδ, where P = S-1 is the Hessian.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### BFGSMinimizer

public BFGSMinimizer(boolean isFletcherSwitch,
double epsilon,
int maxIterations)
Construct a multivariate minimizer using the BFGS method.
Parameters:
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
maxIterations - the maximum number of iterations
isFletcherSwitch - indicate whether to use the Fletcher switch
• ### Method Detail

• #### updateHessianInverse1

public static Matrix updateHessianInverse1(Matrix S,
Matrix gamma,
Matrix delta)
Sk+1 = Sk + (1 + γ'Sγ/γ'δ)/γ'δ * δδ' -(δγ'S + Sγδ') / γ'δ, where S = H-1
Parameters:
S - the inverse of a Hessian
gamma - γ
delta - δ
Returns:
an updated Hessian matrix
"Andreas Antoniou, Wu-Sheng Lu, "eq. 7.57," Practical Optimization: Algorithms and Engineering Applications."
• #### updateHessianInverse2

public static Matrix updateHessianInverse2(Matrix S,
Matrix gamma,
Matrix delta)
P + γγ' / γ'δ - P %*% γγ' %*% P / γ'Pδ, where P = S-1 is the Hessian.
Parameters:
S - the inverse of a Hessian
gamma - γ
delta - δ
Returns:
an updated Hessian matrix
• #### dampedBFGSHessianUpdate

public static Matrix dampedBFGSHessianUpdate(Matrix H,
Vector gamma,
Vector delta)
Damped BFGS Hessian update.
Parameters:
H - a Hessian matrix
gamma - γ
delta - δ
Returns:
an updated Hessian matrix
"Jorge Nocedal, Stephen Wright, "Procedure 18.2, Damped BFGS Updating," Numerical Optimization."
• #### solve

public IterativeSolution<Vector> solve(C2OptimProblem problem)
throws Exception
Description copied from class: SteepestDescentMinimizer
Solve a minimization problem with a C2 objective function.
Specified by:
solve in interface Optimizer<C2OptimProblem,IterativeSolution<Vector>>
Specified by:
solve in class SteepestDescentMinimizer
Parameters:
problem - a minimization problem with a C2 objective function
Returns:
a minimizer
Throws:
Exception - when there is an error solving the problem