public abstract class AbstractLeastSquaresOptimizer extends JacobianMultivariateVectorOptimizer
evaluations, iterations
Modifier | Constructor and Description |
---|---|
protected |
AbstractLeastSquaresOptimizer(ConvergenceChecker<PointVectorValuePair> checker) |
Modifier and Type | Method and Description |
---|---|
protected double |
computeCost(double[] residuals)
Computes the cost.
|
double[][] |
computeCovariances(double[] params,
double threshold)
Get the covariance matrix of the optimized parameters.
|
protected double[] |
computeResiduals(double[] objectiveValue)
Computes the residuals.
|
double[] |
computeSigma(double[] params,
double covarianceSingularityThreshold)
Computes an estimate of the standard deviation of the parameters.
|
protected RealMatrix |
computeWeightedJacobian(double[] params)
Computes the weighted Jacobian matrix.
|
double |
getChiSquare()
Get a Chi-Square-like value assuming the N residuals follow N
distinct normal distributions centered on 0 and whose variances are
the reciprocal of the weights.
|
double |
getRMS()
Gets the root-mean-square (RMS) value.
|
RealMatrix |
getWeightSquareRoot()
Gets the square-root of the weight matrix.
|
PointVectorValuePair |
optimize(OptimizationData... optData)
Stores data and performs the optimization.
|
protected void |
setCost(double costIn)
Sets the cost.
|
computeJacobian
computeObjectiveValue, getTarget, getTargetSize, getWeight
getLowerBound, getStartPoint, getUpperBound
doOptimize, getConvergenceChecker, getEvaluations, getIterations, getMaxEvaluations, getMaxIterations, incrementEvaluationCount, incrementIterationCount
protected AbstractLeastSquaresOptimizer(ConvergenceChecker<PointVectorValuePair> checker)
checker
- Convergence checker.protected RealMatrix computeWeightedJacobian(double[] params)
params
- Model parameters at which to compute the Jacobian.DimensionMismatchException
- if the Jacobian dimension does not
match problem dimension.protected double computeCost(double[] residuals)
residuals
- Residuals.computeResiduals(double[])
public double getRMS()
public double getChiSquare()
public RealMatrix getWeightSquareRoot()
protected void setCost(double costIn)
costIn
- Cost value.public double[][] computeCovariances(double[] params, double threshold)
JTJ
matrix, where J
is the
Jacobian matrix.
The threshold
parameter is a way for the caller to specify
that the result of this computation should be considered meaningless,
and thus trigger an exception.params
- Model parameters.threshold
- Singularity threshold.SingularMatrixException
- if the covariance matrix cannot be computed (singular problem).public double[] computeSigma(double[] params, double covarianceSingularityThreshold)
sd(a[i]) ~= sqrt(C[i][i])
, where a[i]
is the optimized value of the i
-th parameter, and C
is
the covariance matrix.params
- Model parameters.covarianceSingularityThreshold
- Singularity threshold (see computeCovariances
).SingularMatrixException
- if the covariance matrix cannot be computed.public PointVectorValuePair optimize(OptimizationData... optData)
optimize
in class JacobianMultivariateVectorOptimizer
optData
- Optimization data. The following data will be looked for:
TooManyEvaluationsException
- if the maximal number of
evaluations is exceeded.DimensionMismatchException
- if the initial guess, target, and weight
arguments have inconsistent dimensions.protected double[] computeResiduals(double[] objectiveValue)
objectiveValue
- Value of the the objective function. This is
the value returned from a call to computeObjectiveValue
(whose
array argument contains the model parameters).DimensionMismatchException
- if params
has a wrong
length.Copyright © 2019 CNES. All rights reserved.