org.apache.commons.math3.fitting.leastsquares
package
(cf. MATH-1008).@Deprecated public abstract class AbstractLeastSquaresOptimizer extends JacobianMultivariateVectorOptimizer
Modifier and Type | Method and Description |
---|---|
double[][] |
computeCovariances(double[] params,
double threshold)
Deprecated.
Get the covariance matrix of the optimized parameters.
|
double[] |
computeSigma(double[] params,
double covarianceSingularityThreshold)
Deprecated.
Computes an estimate of the standard deviation of the parameters.
|
double |
getChiSquare()
Deprecated.
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()
Deprecated.
Gets the root-mean-square (RMS) value.
|
RealMatrix |
getWeightSquareRoot()
Deprecated.
Gets the square-root of the weight matrix.
|
PointVectorValuePair |
optimize(OptimizationData... optData)
Deprecated.
Stores data and performs the optimization.
|
getTarget, getTargetSize, getWeight
getLowerBound, getStartPoint, getUpperBound
getConvergenceChecker, getEvaluations, getIterations, getMaxEvaluations, getMaxIterations, optimize
public double getRMS()
public double getChiSquare()
public RealMatrix getWeightSquareRoot()
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) throws TooManyEvaluationsException
The list of parameters is open-ended so that sub-classes can extend it with arguments specific to their concrete implementations.
When the method is called multiple times, instance data is overwritten only when actually present in the list of arguments: when not specified, data set in a previous call is retained (and thus is optional in subsequent calls).
Important note: Subclasses must override
BaseOptimizer.parseOptimizationData(OptimizationData[])
if they need to register
their own options; but then, they must also call
super.parseOptimizationData(optData)
within that method.
optimize
in class JacobianMultivariateVectorOptimizer
optData
- Optimization data. In addition to those documented in
JacobianMultivariateVectorOptimizer
, this method will register the following data:
TooManyEvaluationsException
- if the maximal number of
evaluations is exceeded.DimensionMismatchException
- if the initial guess, target, and weight
arguments have inconsistent dimensions.Jas4pp 1.5 © Java Analysis Studio for Particle Physics