java.lang.Object
org.bzdev.math.LeastSquaresFit.NonLinear.Config
- Enclosing class:
- LeastSquaresFit.NonLinear
Class to provide data that controls the algorithm used to
create a least-squares fit.
The parameters λ and μ are those used by the
Levenberg-Marquardt algorithm. The parameter
limit
specifies a limit on the number
|Si+1 - Si| / Si where
Si is the sum of squares for the ith
iteration. If the current value is below this limit, convergence
is assumed. The parameter iterationLimit
, if nonzero,
limits the number of iterations If this limit is exceeded, a
constructor for LeastSquaresfit or one of its subclasses will
throw an exception.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Get the iteration limit.double
Get the parameter λdouble
getLimit()
Get the convergence limit.double
getNu()
Get the parameter νvoid
setIterationLimit
(int limit) Set the iteration limit.void
setLambda
(double lambda) Set the parameter λvoid
setLimit
(double limit) Set the convergence limit.void
setNu
(double nu) Set the parameter ν
-
Constructor Details
-
Config
public Config()Constructor. Default values for all the parameters will be used. -
Config
public Config(double lambda, double nu, double limit, int iterationLimit) Constructor specifying parameters.- Parameters:
lambda
- the Levenberg-Marquardt parameter λnu
- the Levenberg-Marquardt parameter νlimit
- the convergence limititerationLimit
- the iteration limit
-
-
Method Details
-
setLambda
public void setLambda(double lambda) Set the parameter λ- Parameters:
lambda
- the Levenberg-Marquardt parameter λ
-
getLambda
public double getLambda()Get the parameter λ- Returns:
- the Levenberg-Marquardt parameter λ
-
setNu
public void setNu(double nu) Set the parameter ν- Parameters:
nu
- the Levenberg-Marquardt parameter ν
-
getNu
public double getNu()Get the parameter ν- Returns:
- the Levenberg-Marquardt parameter ν
-
setLimit
public void setLimit(double limit) Set the convergence limit.- Parameters:
limit
- the convergence limit
-
getLimit
public double getLimit()Get the convergence limit.- Returns:
- the convergence limit.
-
setIterationLimit
public void setIterationLimit(int limit) Set the iteration limit.- Parameters:
limit
- the iteration limit; 0 or negative if there is none
-
getIterationLimit
public int getIterationLimit()Get the iteration limit.- Returns:
- the iteration limit
-