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()
andLeastSquaresProblem.Evaluation.getJacobian()
.Instances are typically either created progressively using a
builder
or created at once using afactory
.- Since:
- 3.3
- See Also:
LeastSquaresBuilder
,LeastSquaresFactory
,LeastSquaresAdapter
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
LeastSquaresProblem.Evaluation
An evaluation of aLeastSquaresProblem
at a particular point.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.math4.legacy.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.
-
-