public class GaussNewtonEstimator extends java.lang.Object implements Estimator, java.io.Serializable
This class solves estimation problems using a weighted least squares criterion on the measurement residuals. It uses a Gauss-Newton algorithm.
| Constructor and Description |
|---|
GaussNewtonEstimator(int maxIterations,
double convergence,
double steadyStateThreshold,
double epsilon)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
estimate(EstimationProblem problem)
Solve an estimation problem using a least squares criterion.
|
double |
getRMS(EstimationProblem problem)
Get the Root Mean Square value.
|
void |
linearEstimate(EstimationProblem problem)
Estimate the solution of a linear least square problem.
|
public GaussNewtonEstimator(int maxIterations,
double convergence,
double steadyStateThreshold,
double epsilon)
This constructor build an estimator and store its convergence characteristics.
An estimator is considered to have converged whenever either the criterion goes below a physical threshold under which improvements are considered useless or when the algorithm is unable to improve it (even if it is still high). The first condition that is met stops the iterations.
The fact an estimator has converged does not mean that the model accurately fits the measurements. It only means no better solution can be found, it does not mean this one is good. Such an analysis is left to the caller.
If neither conditions are fulfilled before a given number of
iterations, the algorithm is considered to have failed and an
EstimationException is thrown.
maxIterations - maximum number of iterations allowedconvergence - criterion threshold below which we do not need
to improve the criterion anymoresteadyStateThreshold - steady state detection threshold, the
problem has converged has reached a steady state if
Math.abs (Jn - Jn-1) < Jn * convergence, where
Jn and Jn-1 are the current and
preceding criterion value (square sum of the weighted residuals
of considered measurements).epsilon - threshold under which the matrix of the linearized
problem is considered singular (see SquareMatrix.solve).public void estimate(EstimationProblem problem) throws EstimationException
This method set the unbound parameters of the given problem starting from their current values through several iterations. At each step, the unbound parameters are changed in order to minimize a weighted least square criterion based on the measurements of the problem.
The iterations are stopped either when the criterion goes
below a physical threshold under which improvement are considered
useless or when the algorithm is unable to improve it (even if it
is still high). The first condition that is met stops the
iterations. If the convergence it nos reached before the maximum
number of iterations, an EstimationException is
thrown.
estimate in interface Estimatorproblem - estimation problem to solveEstimationException - if the problem cannot be solvedEstimationProblempublic void linearEstimate(EstimationProblem problem) throws EstimationException
The Gauss-Newton algorithm is iterative. Each iteration consist in solving a linearized least square problem. Several iterations are needed for general problems since the linearization is only an approximation of the problem behaviour. However, for linear problems one iteration is enough to get the solution. This method is provided in the public interface in order to handle more efficiently these linear problems.
problem - estimation problem to solveEstimationException - if the problem cannot be solvedpublic double getRMS(EstimationProblem problem)
Copyright © 2001-2007 Luc Maisonobe. All Rights Reserved.