public class SequentialGaussNewtonOptimizer extends Object implements LeastSquaresOptimizer
This class solve a least-square problem by solving the normal equations of the linearized problem at each iteration.
LeastSquaresOptimizer.Optimum| Constructor and Description |
|---|
SequentialGaussNewtonOptimizer()
Create a sequential Gauss Newton optimizer.
|
SequentialGaussNewtonOptimizer(MatrixDecomposer decomposer,
boolean formNormalEquations,
LeastSquaresProblem.Evaluation evaluation)
Create a sequential Gauss Newton optimizer that uses the given matrix
decomposition algorithm to solve the normal equations.
|
| Modifier and Type | Method and Description |
|---|---|
MatrixDecomposer |
getDecomposer()
Get the matrix decomposition algorithm.
|
LeastSquaresProblem.Evaluation |
getOldEvaluation()
Get the previous evaluation used by the optimizer.
|
boolean |
isFormNormalEquations()
Get if the normal equations are explicitly formed.
|
LeastSquaresOptimizer.Optimum |
optimize(LeastSquaresProblem lsp)
Solve the non-linear least squares problem.
|
String |
toString() |
SequentialGaussNewtonOptimizer |
withAPrioriData(RealVector aPrioriState,
RealMatrix aPrioriCovariance)
Configure from a priori state and covariance.
|
SequentialGaussNewtonOptimizer |
withDecomposer(MatrixDecomposer newDecomposer)
Configure the matrix decomposition algorithm.
|
SequentialGaussNewtonOptimizer |
withEvaluation(LeastSquaresProblem.Evaluation previousEvaluation)
Configure the previous evaluation used by the optimizer.
|
SequentialGaussNewtonOptimizer |
withFormNormalEquations(boolean newFormNormalEquations)
Configure if the normal equations should be explicitly formed.
|
public SequentialGaussNewtonOptimizer()
public SequentialGaussNewtonOptimizer(MatrixDecomposer decomposer, boolean formNormalEquations, LeastSquaresProblem.Evaluation evaluation)
The decomposer is used to solve JTJx=JTr.
decomposer - the decomposition algorithm to use.formNormalEquations - whether the normal equations should be explicitly
formed. If true then decomposer is used
to solve JTJx=JTr, otherwise
decomposer is used to solve Jx=r. If decomposer can only solve square systems then this
parameter should be true.evaluation - old evaluation previously computed, null if there are no previous evaluations.public MatrixDecomposer getDecomposer()
public SequentialGaussNewtonOptimizer withDecomposer(MatrixDecomposer newDecomposer)
newDecomposer - the decomposition algorithm to use.public boolean isFormNormalEquations()
true then
decomposer is used to solve JTJx=JTr, otherwise
decomposer is used to solve Jx=r.public SequentialGaussNewtonOptimizer withFormNormalEquations(boolean newFormNormalEquations)
newFormNormalEquations - whether the normal equations should be explicitly
formed. If true then decomposer is used
to solve JTJx=JTr, otherwise
decomposer is used to solve Jx=r. If decomposer can only solve square systems then this
parameter should be true.public LeastSquaresProblem.Evaluation getOldEvaluation()
public SequentialGaussNewtonOptimizer withEvaluation(LeastSquaresProblem.Evaluation previousEvaluation)
This building method uses a complete evaluation to retrieve
a priori data. Note that as withAPrioriData(RealVector, RealMatrix)
generates a fake evaluation and calls this method, either
withAPrioriData(RealVector, RealMatrix) or withEvaluation(LeastSquaresProblem.Evaluation)
should be called, but not both as the last one called will override the previous one.
previousEvaluation - the previous evaluation used by the optimizer.public SequentialGaussNewtonOptimizer withAPrioriData(RealVector aPrioriState, RealMatrix aPrioriCovariance)
This building method generates a fake evaluation and calls
withEvaluation(LeastSquaresProblem.Evaluation), so either
withAPrioriData(RealVector, RealMatrix) or withEvaluation(LeastSquaresProblem.Evaluation)
should be called, but not both as the last one called will override the previous one.
aPrioriState - a priori state to useaPrioriCovariance - a priori covariance to usepublic LeastSquaresOptimizer.Optimum optimize(LeastSquaresProblem lsp)
optimize in interface LeastSquaresOptimizerlsp - the problem definition, including model function and
convergence criteria.Copyright © 2016-2021 CS GROUP. All rights reserved.