LeastSquaresProblem (Apache Commons Math 3.6.1 API)

org.apache.commons.math3.fitting.leastsquares

## Interface LeastSquaresProblem

- All Superinterfaces:
    OptimizationProblem<LeastSquaresProblem.Evaluation>
  All Known Implementing Classes:
    LeastSquaresAdapter

      public interface LeastSquaresProblem
      extends OptimizationProblem<LeastSquaresProblem.Evaluation>

  The data necessary to define a non-linear least squares problem.

  Includes the observed values, computed model function, and convergence/divergence criteria. Weights are implicit in `LeastSquaresProblem.Evaluation.getResiduals()` and `LeastSquaresProblem.Evaluation.getJacobian()`.

  Instances are typically either created progressively using a `builder` or created at once using a `factory`.

  Since:
    3.3
  See Also:
    `LeastSquaresBuilder`, `LeastSquaresFactory`, `LeastSquaresAdapter`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `LeastSquaresProblem.Evaluation` An evaluation of a `LeastSquaresProblem` at a particular point.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `LeastSquaresProblem.Evaluation` | `evaluate(RealVector point)` Evaluate the model at the specified point.
    `int` | `getObservationSize()` Get the number of observations (rows in the Jacobian) in this problem.
    `int` | `getParameterSize()` Get the number of parameters (columns in the Jacobian) in this problem.
    `RealVector` | `getStart()` Gets the initial guess.

    - ### Methods inherited from interface org.apache.commons.math3.optim.OptimizationProblem

      `getConvergenceChecker, getEvaluationCounter, getIterationCounter`

- - ### Method Detail

    - #### getStart

          RealVector getStart()

      Gets the initial guess.
      Returns:
        the initial guess values.

    - #### getObservationSize

          int getObservationSize()

      Get the number of observations (rows in the Jacobian) in this problem.
      Returns:
        the number of scalar observations

    - #### getParameterSize

          int getParameterSize()

      Get the number of parameters (columns in the Jacobian) in this problem.
      Returns:
        the number of scalar parameters

    - #### evaluate

          LeastSquaresProblem.Evaluation evaluate(RealVector point)

      Evaluate the model at the specified point.
      Parameters:
        `point` - the parameter values.
      Returns:
        the model's value and derivative at the given point.
      Throws:
        `TooManyEvaluationsException` - if the maximal number of evaluations (of the model vector function) is exceeded.

Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.