|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.estimation.AbstractEstimator
@Deprecated public abstract class AbstractEstimator
Base class for implementing estimators.
This base class handles the boilerplates methods associated to thresholds settings, jacobian and error estimation.
Field Summary | |
---|---|
protected int |
cols
Deprecated. Number of columns of the jacobian matrix. |
protected double |
cost
Deprecated. Cost value (square root of the sum of the residuals). |
static int |
DEFAULT_MAX_COST_EVALUATIONS
Deprecated. Default maximal number of cost evaluations allowed. |
protected double[] |
jacobian
Deprecated. Jacobian matrix. |
protected WeightedMeasurement[] |
measurements
Deprecated. Array of measurements. |
protected EstimatedParameter[] |
parameters
Deprecated. Array of parameters. |
protected double[] |
residuals
Deprecated. Residuals array. |
protected int |
rows
Deprecated. Number of rows of the jacobian matrix. |
Constructor Summary | |
---|---|
protected |
AbstractEstimator()
Deprecated. Build an abstract estimator for least squares problems. |
Method Summary | |
---|---|
abstract void |
estimate(EstimationProblem problem)
Deprecated. Solve an estimation problem. |
double |
getChiSquare(EstimationProblem problem)
Deprecated. Get the Chi-Square value. |
int |
getCostEvaluations()
Deprecated. Get the number of cost evaluations. |
double[][] |
getCovariances(EstimationProblem problem)
Deprecated. Get the covariance matrix of unbound estimated parameters. |
int |
getJacobianEvaluations()
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 void |
incrementJacobianEvaluationsCounter()
Deprecated. Increment the jacobian evaluations counter. |
protected void |
initializeEstimate(EstimationProblem problem)
Deprecated. Initialization of the common parts of the estimation. |
void |
setMaxCostEval(int maxCostEval)
Deprecated. Set the maximal number of cost evaluations allowed. |
protected void |
updateJacobian()
Deprecated. Update the jacobian matrix. |
protected void |
updateResidualsAndCost()
Deprecated. Update the residuals array and cost function value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_MAX_COST_EVALUATIONS
protected WeightedMeasurement[] measurements
protected EstimatedParameter[] parameters
protected double[] jacobian
This matrix is in canonical form just after the calls to
updateJacobian()
, but may be modified by the solver
in the derived class (the Levenberg-Marquardt estimator
does this).
protected int cols
protected int rows
protected double[] residuals
This array is in canonical form just after the calls to
updateJacobian()
, but may be modified by the solver
in the derived class (the Levenberg-Marquardt estimator
does this).
protected double cost
Constructor Detail |
---|
protected AbstractEstimator()
The maximal number of cost evaluations allowed is set
to its default value DEFAULT_MAX_COST_EVALUATIONS
.
Method Detail |
---|
public final void setMaxCostEval(int maxCostEval)
maxCostEval
- maximal number of cost evaluations allowedestimate(org.apache.commons.math.estimation.EstimationProblem)
public final int getCostEvaluations()
public final int getJacobianEvaluations()
protected void updateJacobian()
protected final void incrementJacobianEvaluationsCounter()
protected void updateResidualsAndCost() throws EstimationException
EstimationException
- if the number of cost evaluations
exceeds the maximum allowedpublic double getRMS(EstimationProblem problem)
getRMS
in interface Estimator
problem
- estimation problem
Estimator.guessParametersErrors(EstimationProblem)
public double getChiSquare(EstimationProblem problem)
problem
- estimation problem
public double[][] getCovariances(EstimationProblem problem) throws EstimationException
getCovariances
in interface Estimator
problem
- estimation problem
EstimationException
- if the covariance matrix
cannot be computed (singular problem)public double[] guessParametersErrors(EstimationProblem problem) throws EstimationException
Guessing is covariance-based, it only gives rough order of magnitude.
guessParametersErrors
in interface Estimator
problem
- estimation problem
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)Estimator.getRMS(EstimationProblem)
protected void initializeEstimate(EstimationProblem problem)
This method must be called at the start
of the estimate
method.
problem
- estimation problem to solvepublic abstract void estimate(EstimationProblem problem) throws EstimationException
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.
estimate
in interface Estimator
problem
- estimation problem to solve
EstimationException
- if the problem cannot be solved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |