Class AbstractLeastSquaresOptimizer

java.lang.Object
org.apache.commons.math.optimization.general.AbstractLeastSquaresOptimizer
All Implemented Interfaces:
DifferentiableMultivariateVectorialOptimizer
Direct Known Subclasses:
GaussNewtonOptimizer, LevenbergMarquardtOptimizer

public abstract class AbstractLeastSquaresOptimizer extends Object implements DifferentiableMultivariateVectorialOptimizer
Base class for implementing least squares optimizers.

This base class handles the boilerplate methods associated to thresholds settings, jacobian and error estimation.

Since:
1.2
Version:
$Revision: 1073158 $ $Date: 2011-02-21 22:46:52 +0100 (lun. 21 févr. 2011) $
  • Field Details

    • DEFAULT_MAX_ITERATIONS

      public static final int DEFAULT_MAX_ITERATIONS
      Default maximal number of iterations allowed.
      See Also:
    • checker

      protected VectorialConvergenceChecker checker
      Convergence checker.
    • jacobian

      protected double[][] jacobian
      Jacobian matrix.

      This matrix is in canonical form just after the calls to updateJacobian(), but may be modified by the solver in the derived class (the Levenberg-Marquardt optimizer does this).

    • cols

      protected int cols
      Number of columns of the jacobian matrix.
    • rows

      protected int rows
      Number of rows of the jacobian matrix.
    • targetValues

      protected double[] targetValues
      Target value for the objective functions at optimum.
      Since:
      2.1
    • residualsWeights

      protected double[] residualsWeights
      Weight for the least squares cost computation.
      Since:
      2.1
    • point

      protected double[] point
      Current point.
    • objective

      protected double[] objective
      Current objective function value.
    • residuals

      protected double[] residuals
      Current residuals.
    • wjacobian

      protected double[][] wjacobian
      Weighted Jacobian
    • wresiduals

      protected double[] wresiduals
      Weighted residuals
    • cost

      protected double cost
      Cost value (square root of the sum of the residuals).
  • Constructor Details

    • AbstractLeastSquaresOptimizer

      protected AbstractLeastSquaresOptimizer()
      Simple constructor with default settings.

      The convergence check is set to a SimpleVectorialValueChecker and the maximal number of evaluation is set to its default value.

  • Method Details