Class LeastSquaresFit.NonLinear.Config

java.lang.Object
org.bzdev.math.LeastSquaresFit.NonLinear.Config
Enclosing class:
LeastSquaresFit.NonLinear

public static class LeastSquaresFit.NonLinear.Config extends Object
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 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 limit
      iterationLimit - 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