|
||||||||||
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
org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizer
public class LevenbergMarquardtOptimizer
This class solves a least squares problem using the Levenberg-Marquardt algorithm.
This implementation should work even for over-determined systems (i.e. systems having more point than equations). Over-determined systems are solved by ignoring the point which have the smallest impact according to their jacobian column norm. Only the rank of the matrix and some loop bounds are changed to implement this.
The resolution engine is a simple translation of the MINPACK lmder routine with minor changes. The changes include the over-determined resolution and the Q.R. decomposition which has been rewritten following the algorithm described in the P. Lascaux and R. Theodor book Analyse numérique matricielle appliquée à l'art de l'ingénieur, Masson 1986. The redistribution policy for MINPACK is available here, for convenience, it is reproduced below.
Minpack Copyright Notice (1999) University of Chicago. All rights reserved |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
|
Field Summary |
---|
Fields inherited from class org.apache.commons.math.optimization.general.AbstractLeastSquaresOptimizer |
---|
checker, cols, cost, DEFAULT_MAX_ITERATIONS, jacobian, objective, point, residuals, rows, target, weights |
Constructor Summary | |
---|---|
LevenbergMarquardtOptimizer()
Build an optimizer for least squares problems. |
Method Summary | |
---|---|
protected VectorialPointValuePair |
doOptimize()
Perform the bulk of optimization algorithm. |
void |
setCostRelativeTolerance(double costRelativeTolerance)
Set the desired relative error in the sum of squares. |
void |
setInitialStepBoundFactor(double initialStepBoundFactor)
Set the positive input variable used in determining the initial step bound. |
void |
setOrthoTolerance(double orthoTolerance)
Set the desired max cosine on the orthogonality. |
void |
setParRelativeTolerance(double parRelativeTolerance)
Set the desired relative error in the approximate solution parameters. |
Methods inherited from class org.apache.commons.math.optimization.general.AbstractLeastSquaresOptimizer |
---|
getChiSquare, getConvergenceChecker, getCovariances, getEvaluations, getIterations, getJacobianEvaluations, getMaxEvaluations, getMaxIterations, getRMS, guessParametersErrors, incrementIterationsCounter, optimize, setConvergenceChecker, setMaxEvaluations, setMaxIterations, updateJacobian, updateResidualsAndCost |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LevenbergMarquardtOptimizer()
The default values for the algorithm settings are:
initial step bound factor
: 100.0maximal iterations
: 1000cost relative tolerance
: 1.0e-10parameters relative tolerance
: 1.0e-10orthogonality tolerance
: 1.0e-10
Method Detail |
---|
public void setInitialStepBoundFactor(double initialStepBoundFactor)
initialStepBoundFactor
- initial step bound factorpublic void setCostRelativeTolerance(double costRelativeTolerance)
costRelativeTolerance
- desired relative error in the sum of squarespublic void setParRelativeTolerance(double parRelativeTolerance)
parRelativeTolerance
- desired relative error
in the approximate solution parameterspublic void setOrthoTolerance(double orthoTolerance)
orthoTolerance
- desired max cosine on the orthogonality
between the function vector and the columns of the jacobianprotected VectorialPointValuePair doOptimize() throws FunctionEvaluationException, OptimizationException, IllegalArgumentException
doOptimize
in class AbstractLeastSquaresOptimizer
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 |