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
Modifier and TypeFieldDescriptionprotected DMatrixRMaj
protected double
protected double
protected double
protected TrustRegionBase_F64<S,
?> protected boolean
protected DMatrixRMaj
protected DMatrixRMaj
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
cauchyStep
(double regionRadius, DMatrixRMaj step) Computes the Cauchy step, This is only called if the Cauchy point lies after or on the trust regionprotected void
combinedStep
(double regionRadius, DMatrixRMaj step) void
computeUpdate
(DMatrixRMaj step, double regionRadius) Compute the value of p given a new parameter state x and the region radius.protected void
gaussNewtonStep
(DMatrixRMaj step) double
Returns the predicted reduction from the quadratic model.
reduction = m(0) - m(p) = -g(0)*p - 0.5*pT*H(0)*pdouble
This function returns ||p||.void
initialize
(TrustRegionBase_F64<S, ?> owner, int numberOfParameters, double minimumFunctionValue) Must call this function first.void
Initialize the parameter update.void
setVerbose
(@Nullable PrintStream verbose, int level) protected boolean
solveGaussNewtonPoint
(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.ParameterUpdate
Must call this function first. Specifies the number of parameters that are being optimized.- Specified by:
initialize
in 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.ParameterUpdate
Initialize the parameter update. This is typically where all the expensive computations take place Useful internal class variables:GaussNewtonBase_F64.x
current stateGaussNewtonBase_F64.gradient
Gradient a xGaussNewtonBase_F64.hessian
Hessian at x
- Specified by:
initializeUpdate
in interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>
-
solveGaussNewtonPoint
-
computeUpdate
Description copied from interface:TrustRegionBase_F64.ParameterUpdate
Compute the value of p given a new parameter state x and the region radius.- Specified by:
computeUpdate
in 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.ParameterUpdate
Returns 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:
getPredictedReduction
in interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>
-
getStepLength
public double getStepLength()Description copied from interface:TrustRegionBase_F64.ParameterUpdate
This function returns ||p||.This computation is done inside the update because it can often be done more efficiently without repeating previous computations
- Specified by:
getStepLength
in interfaceTrustRegionBase_F64.ParameterUpdate<S extends DMatrix>
- Returns:
- step length
-
setVerbose
- Specified by:
setVerbose
in 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
-