public class LevenbergMarquardtOptimizer extends AbstractLeastSquaresOptimizer
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, the use of inherited convergence checker 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 authors of the original fortran version are:
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:
|
DEFAULT_MAX_ITERATIONS
Constructor and Description |
---|
LevenbergMarquardtOptimizer()
Build an optimizer for least squares problems.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
setQRRankingThreshold(double threshold)
Set the desired threshold for QR ranking.
|
getChiSquare, getConvergenceChecker, getCovariances, getEvaluations, getIterations, getJacobianEvaluations, getMaxEvaluations, getMaxIterations, getRMS, guessParametersErrors, optimize, setConvergenceChecker, setMaxEvaluations, setMaxIterations
public LevenbergMarquardtOptimizer()
The default values for the algorithm settings are:
vectorial convergence checker
: nullinitial step bound factor
: 100.0maximal iterations
: 1000cost relative tolerance
: 1.0e-10parameters relative tolerance
: 1.0e-10orthogonality tolerance
: 1.0e-10QR ranking threshold
: MathUtils.SAFE_MIN
These default values may be overridden after construction. If the vectorial convergence checker
is set to a non-null value, it
will be used instead of the cost relative tolerance
and parameters relative tolerance
settings.
public void setInitialStepBoundFactor(double initialStepBoundFactor)
initialStepBoundFactor
- initial step bound factorpublic void setCostRelativeTolerance(double costRelativeTolerance)
This setting is used only if the vectorial
convergence checker
is set to null.
costRelativeTolerance
- desired relative error in the sum of squarespublic void setParRelativeTolerance(double parRelativeTolerance)
This setting is used only if the vectorial
convergence checker
is set to null.
parRelativeTolerance
- desired relative error
in the approximate solution parameterspublic void setOrthoTolerance(double orthoTolerance)
This setting is always used, regardless of the vectorial convergence checker
being null or non-null.
orthoTolerance
- desired max cosine on the orthogonality
between the function vector and the columns of the jacobianpublic void setQRRankingThreshold(double threshold)
If the squared norm of a column vector is smaller or equal to this threshold during QR decomposition, it is considered to be a zero vector and hence the rank of the matrix is reduced.
threshold
- threshold for QR ranking"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"