Class AbstractEstimator
- All Implemented Interfaces:
Estimator
- Direct Known Subclasses:
GaussNewtonEstimator
,LevenbergMarquardtEstimator
This base class handles the boilerplates methods associated to thresholds settings, jacobian and error estimation.
- Since:
- 1.2
- Version:
- $Revision: 990655 $ $Date: 2010-08-29 23:49:40 +0200 (dim. 29 août 2010) $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
Deprecated.Number of columns of the jacobian matrix.protected double
Deprecated.Cost value (square root of the sum of the residuals).static final int
Deprecated.Default maximal number of cost evaluations allowed.protected double[]
Deprecated.Jacobian matrix.protected WeightedMeasurement[]
Deprecated.Array of measurements.protected EstimatedParameter[]
Deprecated.Array of parameters.protected double[]
Deprecated.Residuals array.protected int
Deprecated.Number of rows of the jacobian matrix. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Deprecated.Build an abstract estimator for least squares problems. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
estimate
(EstimationProblem problem) Deprecated.Solve an estimation problem.double
getChiSquare
(EstimationProblem problem) Deprecated.Get the Chi-Square value.final int
Deprecated.Get the number of cost evaluations.double[][]
getCovariances
(EstimationProblem problem) Deprecated.Get the covariance matrix of unbound estimated parameters.final int
Deprecated.Get the number of jacobian evaluations.double
getRMS
(EstimationProblem problem) Deprecated.Get the Root Mean Square value.double[]
guessParametersErrors
(EstimationProblem problem) Deprecated.Guess the errors in unbound estimated parameters.protected final void
Deprecated.Increment the jacobian evaluations counter.protected void
initializeEstimate
(EstimationProblem problem) Deprecated.Initialization of the common parts of the estimation.final void
setMaxCostEval
(int maxCostEval) Deprecated.Set the maximal number of cost evaluations allowed.protected void
Deprecated.Update the jacobian matrix.protected void
Deprecated.Update the residuals array and cost function value.
-
Field Details
-
DEFAULT_MAX_COST_EVALUATIONS
public static final int DEFAULT_MAX_COST_EVALUATIONSDeprecated.Default maximal number of cost evaluations allowed.- See Also:
-
measurements
Deprecated.Array of measurements. -
parameters
Deprecated.Array of parameters. -
jacobian
protected double[] jacobianDeprecated.Jacobian matrix.This matrix is in canonical form just after the calls to
updateJacobian()
, but may be modified by the solver in the derived class (theLevenberg-Marquardt estimator
does this). -
cols
protected int colsDeprecated.Number of columns of the jacobian matrix. -
rows
protected int rowsDeprecated.Number of rows of the jacobian matrix. -
residuals
protected double[] residualsDeprecated.Residuals array.This array is in canonical form just after the calls to
updateJacobian()
, but may be modified by the solver in the derived class (theLevenberg-Marquardt estimator
does this). -
cost
protected double costDeprecated.Cost value (square root of the sum of the residuals).
-
-
Constructor Details
-
AbstractEstimator
protected AbstractEstimator()Deprecated.Build an abstract estimator for least squares problems.The maximal number of cost evaluations allowed is set to its default value
DEFAULT_MAX_COST_EVALUATIONS
.
-
-
Method Details
-
setMaxCostEval
public final void setMaxCostEval(int maxCostEval) Deprecated.Set the maximal number of cost evaluations allowed.- Parameters:
maxCostEval
- maximal number of cost evaluations allowed- See Also:
-
getCostEvaluations
public final int getCostEvaluations()Deprecated.Get the number of cost evaluations.- Returns:
- number of cost evaluations
-
getJacobianEvaluations
public final int getJacobianEvaluations()Deprecated.Get the number of jacobian evaluations.- Returns:
- number of jacobian evaluations
-
updateJacobian
protected void updateJacobian()Deprecated.Update the jacobian matrix. -
incrementJacobianEvaluationsCounter
protected final void incrementJacobianEvaluationsCounter()Deprecated.Increment the jacobian evaluations counter. -
updateResidualsAndCost
Deprecated.Update the residuals array and cost function value.- Throws:
EstimationException
- if the number of cost evaluations exceeds the maximum allowed
-
getRMS
Deprecated.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). -
getChiSquare
Deprecated.Get the Chi-Square value.- Parameters:
problem
- estimation problem- Returns:
- chi-square value
-
getCovariances
Deprecated.Get the covariance matrix of unbound estimated parameters.- Specified by:
getCovariances
in interfaceEstimator
- Parameters:
problem
- estimation problem- Returns:
- covariance matrix
- Throws:
EstimationException
- if the covariance matrix cannot be computed (singular problem)
-
guessParametersErrors
Deprecated.Guess the errors in unbound estimated parameters.Guessing is covariance-based, it only gives rough order of magnitude.
- Specified by:
guessParametersErrors
in interfaceEstimator
- Parameters:
problem
- estimation problem- Returns:
- errors in estimated parameters
- Throws:
EstimationException
- if the covariances matrix cannot be computed or the number of degrees of freedom is not positive (number of measurements lesser or equal to number of parameters)- See Also:
-
initializeEstimate
Deprecated.Initialization of the common parts of the estimation.This method must be called at the start of the
estimate
method.- Parameters:
problem
- estimation problem to solve
-
estimate
Deprecated.Solve an estimation problem.The method should set the parameters of the problem to several trial values until it reaches convergence. If this method returns normally (i.e. without throwing an exception), then the best estimate of the parameters can be retrieved from the problem itself, through the
EstimationProblem.getAllParameters
method.- Specified by:
estimate
in interfaceEstimator
- Parameters:
problem
- estimation problem to solve- Throws:
EstimationException
- if the problem cannot be solved
-