Package org.ddogleg.optimization.math
Class HessianBFGS_DDRM
java.lang.Object
org.ddogleg.optimization.math.HessianMath_DDRM
org.ddogleg.optimization.math.HessianBFGS_DDRM
- All Implemented Interfaces:
HessianBFGS
,HessianMath
Uses DFP to estimate the Hessian and BFGS to estimate the inverse Hessian. See [1].
A more efficient way to do this would be to compute the Cholesky decomposition directly, then
use that for forward and inverse operations
[1] Jorge Nocedal,and Stephen J. Wright "Numerical Optimization" 2nd Ed. Springer 2006
-
Field Summary
Fields inherited from class org.ddogleg.optimization.math.HessianMath_DDRM
hessian, solver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
divideRowsCols
(DMatrixRMaj scaling) Applies row and column division using the scaling vector.void
init
(int numParameters) Initialize Hessian to be in its initial state with the specified dimensionsboolean
Initializes the solverboolean
solve
(DMatrixRMaj Y, DMatrixRMaj step) Solves the system step = inv(B)*Yvoid
update
(DMatrixRMaj s, DMatrixRMaj y) Updates the Hessian using BFGSMethods inherited from class org.ddogleg.optimization.math.HessianMath_DDRM
extractDiagonals, getHessian, innerVectorHessian, setDiagonals
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ddogleg.optimization.math.HessianMath
extractDiagonals, innerVectorHessian, setDiagonals
-
Constructor Details
-
HessianBFGS_DDRM
public HessianBFGS_DDRM(boolean computeInverse)
-
-
Method Details
-
divideRowsCols
Description copied from interface:HessianMath
Applies row and column division using the scaling vector. B = inv(diag(s))*B*inv(diag(s))- Specified by:
divideRowsCols
in interfaceHessianMath
- Overrides:
divideRowsCols
in classHessianMath_DDRM
-
init
public void init(int numParameters) Description copied from interface:HessianMath
Initialize Hessian to be in its initial state with the specified dimensions- Specified by:
init
in interfaceHessianMath
- Overrides:
init
in classHessianMath_DDRM
- Parameters:
numParameters
- Number of optimization parameters. Hessian will be N by N
-
update
Description copied from interface:HessianBFGS
Updates the Hessian using BFGS- Specified by:
update
in interfaceHessianBFGS
- Parameters:
s
- change in state (new - old)y
- change in gradient (new - old)
-
initializeSolver
public boolean initializeSolver()Description copied from interface:HessianMath
Initializes the solver- Specified by:
initializeSolver
in interfaceHessianMath
- Overrides:
initializeSolver
in classHessianMath_DDRM
- Returns:
- true if successful
-
solve
Description copied from interface:HessianMath
Solves the system step = inv(B)*Y- Specified by:
solve
in interfaceHessianMath
- Overrides:
solve
in classHessianMath_DDRM
- Parameters:
Y
- (Input) vectorstep
- (output) vector
-