Class GaussNewtonEstimator
- java.lang.Object
-
- org.spaceroots.mantissa.estimation.GaussNewtonEstimator
-
- All Implemented Interfaces:
- java.io.Serializable, Estimator
public class GaussNewtonEstimator extends java.lang.Object implements Estimator, java.io.Serializable
This class implements a solver for estimation problems.This class solves estimation problems using a weighted least squares criterion on the measurement residuals. It uses a Gauss-Newton algorithm.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description GaussNewtonEstimator(int maxIterations, double convergence, double steadyStateThreshold, double epsilon)Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidestimate(EstimationProblem problem)Solve an estimation problem using a least squares criterion.doublegetRMS(EstimationProblem problem)Get the Root Mean Square value.voidlinearEstimate(EstimationProblem problem)Estimate the solution of a linear least square problem.
-
-
-
Constructor Detail
-
GaussNewtonEstimator
public GaussNewtonEstimator(int maxIterations, double convergence, double steadyStateThreshold, double epsilon)Simple constructor.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
EstimationExceptionis thrown.- Parameters:
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 ifMath.abs (Jn - Jn-1) < Jn * convergence, whereJnandJn-1are 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 (seeSquareMatrix.solve).
-
-
Method Detail
-
estimate
public void estimate(EstimationProblem problem) throws EstimationException
Solve an estimation problem using a least squares criterion.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
EstimationExceptionis thrown.- Specified by:
estimatein interfaceEstimator- Parameters:
problem- estimation problem to solve- Throws:
EstimationException- if the problem cannot be solved- See Also:
EstimationProblem
-
linearEstimate
public void linearEstimate(EstimationProblem problem) throws EstimationException
Estimate the solution of a linear least square problem.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.
- Parameters:
problem- estimation problem to solve- Throws:
EstimationException- if the problem cannot be solved
-
getRMS
public double getRMS(EstimationProblem problem)
Get the Root Mean Square value. Get the Root Mean Square value, i.e. the root of the arithmetic mean of the square of all weighted residuals. This is related to the criterion that is minimized by the estimator as follows: if c if the criterion, and n is the number of measurements, then the RMS is sqrt (c/n).
-
-
DataMelt 3.0 © DataMelt by jWork.ORG