|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.math.optimization.general.AbstractLeastSquaresOptimizer
public abstract class AbstractLeastSquaresOptimizer
Base class for implementing least squares optimizers.
This base class handles the boilerplate methods associated to thresholds settings, jacobian and error estimation.
| Field Summary | |
|---|---|
static int |
DEFAULT_MAX_ITERATIONS
Default maximal number of iterations allowed. |
| Method Summary | |
|---|---|
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. |
VectorialConvergenceChecker |
getConvergenceChecker()
Get the convergence checker. |
double[][] |
getCovariances()
Get the covariance matrix of optimized parameters. |
int |
getEvaluations()
Get the number of evaluations of the objective function. |
int |
getIterations()
Get the number of iterations realized by the algorithm. |
int |
getJacobianEvaluations()
Get the number of evaluations of the objective function jacobian . |
int |
getMaxEvaluations()
Get the maximal number of functions evaluations. |
int |
getMaxIterations()
Get the maximal number of iterations of the algorithm. |
double |
getRMS()
Get the Root Mean Square value. |
double[] |
guessParametersErrors()
Guess the errors in optimized parameters. |
VectorialPointValuePair |
optimize(DifferentiableMultivariateVectorialFunction f,
double[] target,
double[] weights,
double[] startPoint)
Optimizes an objective function. |
void |
setConvergenceChecker(VectorialConvergenceChecker convergenceChecker)
Set the convergence checker. |
void |
setMaxEvaluations(int maxEvaluations)
Set the maximal number of functions evaluations. |
void |
setMaxIterations(int maxIterations)
Set the maximal number of iterations of the algorithm. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_MAX_ITERATIONS
| Method Detail |
|---|
public void setMaxIterations(int maxIterations)
setMaxIterations in interface DifferentiableMultivariateVectorialOptimizermaxIterations - maximal number of function calls
.public int getMaxIterations()
getMaxIterations in interface DifferentiableMultivariateVectorialOptimizerpublic int getIterations()
getIterations in interface DifferentiableMultivariateVectorialOptimizerpublic void setMaxEvaluations(int maxEvaluations)
setMaxEvaluations in interface DifferentiableMultivariateVectorialOptimizermaxEvaluations - maximal number of function evaluationspublic int getMaxEvaluations()
getMaxEvaluations in interface DifferentiableMultivariateVectorialOptimizerpublic int getEvaluations()
The number of evaluation correspond to the last call to the
optimize method. It is 0 if
the method has not been called yet.
getEvaluations in interface DifferentiableMultivariateVectorialOptimizerpublic int getJacobianEvaluations()
The number of evaluation correspond to the last call to the
optimize method. It is 0 if
the method has not been called yet.
getJacobianEvaluations in interface DifferentiableMultivariateVectorialOptimizerpublic void setConvergenceChecker(VectorialConvergenceChecker convergenceChecker)
setConvergenceChecker in interface DifferentiableMultivariateVectorialOptimizerconvergenceChecker - object to use to check for convergencepublic VectorialConvergenceChecker getConvergenceChecker()
getConvergenceChecker in interface DifferentiableMultivariateVectorialOptimizerpublic double getRMS()
public double getChiSquare()
public double[][] getCovariances()
throws FunctionEvaluationException,
OptimizationException
FunctionEvaluationException - if the function jacobian cannot
be evaluated
OptimizationException - if the covariance matrix
cannot be computed (singular problem)
public double[] guessParametersErrors()
throws FunctionEvaluationException,
OptimizationException
Guessing is covariance-based, it only gives rough order of magnitude.
FunctionEvaluationException - if the function jacobian cannot b evaluated
OptimizationException - 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)
public VectorialPointValuePair optimize(DifferentiableMultivariateVectorialFunction f,
double[] target,
double[] weights,
double[] startPoint)
throws FunctionEvaluationException,
OptimizationException,
IllegalArgumentException
Optimization is considered to be a weighted least-squares minimization. The cost function to be minimized is ∑weighti(objectivei-targeti)2
optimize in interface DifferentiableMultivariateVectorialOptimizerf - objective functiontarget - target value for the objective functions at optimumweights - weight for the least squares cost computationstartPoint - the start point for optimization
FunctionEvaluationException - if the objective function throws one during
the search
OptimizationException - if the algorithm failed to converge
IllegalArgumentException - if the start point dimension is wrong
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||