org.ddogleg.optimization.impl
Interface TrustRegionStep
-
- All Known Implementing Classes:
- CauchyStep, DoglegStepF, DoglegStepFtF
public interface TrustRegionStepComputes the next step to take in the trust region approach and the expected reduction. This interface has been designed to facilitate efficient computation.
The predicted reduction is defined as L(0) - L(h)
where L(h) is a linear model:
L(h) = 0.5||f(x) + J(x)*h||2
which can be reduced to:
L(0) - L(h) = -fT(x)*J(x)*h - 0.5*hTJ(x)T*J(x)*h
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidcomputeStep(double regionRadius, org.ejml.data.DenseMatrix64F step)Computes the next step to take for a given trust region.voidinit(int numParam, int numFunctions)Initialize internal data structures.booleanisMaxStep()Was a step equal to the regionRadius taken?doublepredictedReduction()Returns the predicted reduction for the step.voidsetInputs(org.ejml.data.DenseMatrix64F x, org.ejml.data.DenseMatrix64F residuals, org.ejml.data.DenseMatrix64F J, org.ejml.data.DenseMatrix64F gradient, double fx)Specifies the state of the system being optimized.
-
-
-
Method Detail
-
init
void init(int numParam, int numFunctions)Initialize internal data structures. Only needs to be called once.- Parameters:
numParam- Number of parameters being optimizes. This is the length of 'x'numFunctions- Number of functions. Number of outputs to f(x)
-
setInputs
void setInputs(org.ejml.data.DenseMatrix64F x, org.ejml.data.DenseMatrix64F residuals, org.ejml.data.DenseMatrix64F J, org.ejml.data.DenseMatrix64F gradient, double fx)Specifies the state of the system being optimized. Call beforecomputeStep(double, org.ejml.data.DenseMatrix64F).- Parameters:
x- Sample point being considered.residuals- Function output: f(x)J- Jacobian: J(x)gradient- Gradient: JT(x)*f(x)fx- Residual at x: 0.5*fT(x)*f(x)
-
computeStep
void computeStep(double regionRadius, org.ejml.data.DenseMatrix64F step)Computes the next step to take for a given trust region. Must invokesetInputs(org.ejml.data.DenseMatrix64F, org.ejml.data.DenseMatrix64F, org.ejml.data.DenseMatrix64F, org.ejml.data.DenseMatrix64F, double)before, but it only needs to be called once.- Parameters:
regionRadius- Size of the trust region.step- Output, the computed step.
-
predictedReduction
double predictedReduction()
Returns the predicted reduction for the step. A linear model is used to predict the reduction. See class description for- Returns:
- The predicted reduction.
-
isMaxStep
boolean isMaxStep()
Was a step equal to the regionRadius taken?- Returns:
- true if maximum step and false if less than the maximum step
-
-
DataMelt 3.0 © DataMelt by jWork.ORG