Class TrustRegionUpdateDogleg_F64<S extends DMatrix>
- All Implemented Interfaces:
TrustRegionBase_F64.ParameterUpdate<S>
Approximates the optimal solution to the Trust Region's sub-problem using a piecewise linear approach [1,2]. The first part of the "dogleg" is a line along the steepest descent line. The second part moves towards the solution to unconstrained sub-problem, a.k.a. Gauss-Newton solution. Positive-definite Hessians are handled using standard equations. Negative semi-definite systems will take a Cauchy step to avoid blowing up, see [2]. A more elegant solution to negative definite systems is outline in [1] but hasn't been implemented yet due to complexity.
- [1] Jorge Nocedal,and Stephen J. Wright "Numerical Optimization" 2nd Ed. Springer 2006
- [2] Peter Abeles, "DDogleg Technical Report: Nonlinear Optimization R1", July 2018
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DMatrixRMajprotected doubleprotected doubleprotected doubleprotected TrustRegionBase_F64<S,?> protected booleanprotected DMatrixRMajprotected DMatrixRMaj -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcauchyStep(double regionRadius, DMatrixRMaj step) Computes the Cauchy step, This is only called if the Cauchy point lies after or on the trust regionprotected voidcombinedStep(double regionRadius, DMatrixRMaj step) voidcomputeUpdate(DMatrixRMaj step, double regionRadius) Compute the value of p given a new parameter state x and the region radius.protected voidgaussNewtonStep(DMatrixRMaj step) doubleReturns the predicted reduction from the quadratic model.
reduction = m(0) - m(p) = -g(0)*p - 0.5*pT*H(0)*pdoubleThis function returns ||p||.voidinitialize(TrustRegionBase_F64<S, ?> owner, int numberOfParameters, double minimumFunctionValue) Must call this function first.voidInitialize the parameter update.voidsetVerbose(@Nullable PrintStream verbose, int level) protected booleansolveGaussNewtonPoint(DMatrixRMaj pointGN)
-
Field Details
-
owner
-
minimumFunctionValue
protected double minimumFunctionValue -
direction
-
gBg
protected double gBg -
stepGN
-
distanceGN
protected double distanceGN -
stepCauchy
-
positiveDefinite
protected boolean positiveDefinite
-
-
Constructor Details
-
TrustRegionUpdateDogleg_F64
public TrustRegionUpdateDogleg_F64()
-
-
Method Details
-
initialize
public void initialize(TrustRegionBase_F64<S, ?> owner, int numberOfParameters, double minimumFunctionValue) Description copied from interface:TrustRegionBase_F64.ParameterUpdateMust call this function first. Specifies the number of parameters that are being optimized.- Specified by:
initializein interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>minimumFunctionValue- The minimum possible value that the function can output
-
initializeUpdate
public void initializeUpdate()Description copied from interface:TrustRegionBase_F64.ParameterUpdateInitialize the parameter update. This is typically where all the expensive computations take place Useful internal class variables:GaussNewtonBase_F64.xcurrent stateGaussNewtonBase_F64.gradientGradient a xGaussNewtonBase_F64.hessianHessian at x
- Specified by:
initializeUpdatein interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>
-
solveGaussNewtonPoint
-
computeUpdate
Description copied from interface:TrustRegionBase_F64.ParameterUpdateCompute the value of p given a new parameter state x and the region radius.- Specified by:
computeUpdatein interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>- Parameters:
step- (Output) change in stateregionRadius- (Input) Radius of the region
-
gaussNewtonStep
-
getPredictedReduction
public double getPredictedReduction()Description copied from interface:TrustRegionBase_F64.ParameterUpdateReturns the predicted reduction from the quadratic model.
reduction = m(0) - m(p) = -g(0)*p - 0.5*pT*H(0)*pThis computation is done inside the update because it can often be done more efficiently without repeating previous computations
- Specified by:
getPredictedReductionin interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>
-
getStepLength
public double getStepLength()Description copied from interface:TrustRegionBase_F64.ParameterUpdateThis function returns ||p||.This computation is done inside the update because it can often be done more efficiently without repeating previous computations
- Specified by:
getStepLengthin interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>- Returns:
- step length
-
setVerbose
- Specified by:
setVerbosein interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>
-
cauchyStep
Computes the Cauchy step, This is only called if the Cauchy point lies after or on the trust region- Parameters:
regionRadius- (Input) Trust region sizestep- (Output) The step
-
combinedStep
-