private static class LeastSquaresFactory.LocalLeastSquaresProblem extends AbstractOptimizationProblem<LeastSquaresProblem.Evaluation> implements LeastSquaresProblem
LeastSquaresProblem
.Modifier and Type | Class and Description |
---|---|
private static class |
LeastSquaresFactory.LocalLeastSquaresProblem.LazyUnweightedEvaluation
Container with the model lazy evaluation at a particular point.
|
private static class |
LeastSquaresFactory.LocalLeastSquaresProblem.UnweightedEvaluation
Container with the model evaluation at a particular point.
|
LeastSquaresProblem.Evaluation
Modifier and Type | Field and Description |
---|---|
private boolean |
lazyEvaluation
Whether to use lazy evaluation.
|
private MultivariateJacobianFunction |
model
Model function.
|
private ParameterValidator |
paramValidator
Model parameters validator.
|
private RealVector |
start
Initial guess.
|
private RealVector |
target
Target values for the model function at optimum.
|
Constructor and Description |
---|
LocalLeastSquaresProblem(MultivariateJacobianFunction model,
RealVector target,
RealVector start,
ConvergenceChecker<LeastSquaresProblem.Evaluation> checker,
int maxEvaluations,
int maxIterations,
boolean lazyEvaluation,
ParameterValidator paramValidator)
Create a
LeastSquaresProblem from the given data. |
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.
|
getConvergenceChecker, getEvaluationCounter, getIterationCounter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConvergenceChecker, getEvaluationCounter, getIterationCounter
private final RealVector target
private final MultivariateJacobianFunction model
private final RealVector start
private final boolean lazyEvaluation
private final ParameterValidator paramValidator
LocalLeastSquaresProblem(MultivariateJacobianFunction model, RealVector target, RealVector start, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations, boolean lazyEvaluation, ParameterValidator paramValidator)
LeastSquaresProblem
from the given data.model
- the model functiontarget
- the observed datastart
- the initial guesschecker
- the convergence checkermaxEvaluations
- the allowed evaluationsmaxIterations
- the allowed iterationslazyEvaluation
- Whether the call to LeastSquaresProblem.evaluate(RealVector)
will defer the evaluation until access to the value is requested.paramValidator
- Model parameters validator.public int getObservationSize()
getObservationSize
in interface LeastSquaresProblem
public int getParameterSize()
getParameterSize
in interface LeastSquaresProblem
public RealVector getStart()
getStart
in interface LeastSquaresProblem
public LeastSquaresProblem.Evaluation evaluate(RealVector point)
evaluate
in interface LeastSquaresProblem
point
- the parameter values.