LeastSquaresProblems.
| Modifier and Type | Class and Description |
|---|---|
| private static class | LeastSquaresFactory.
A private, "field" immutable (not "real" immutable) implementation of |
| private static class | LeastSquaresFactory.
Combine a |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LeastSquaresProblem | Returns: a least squares problem that tracks evaluationsthe problem to track. problem, final Incrementor the counter to increment. counter)
Deprecated
as a consequence of
Incrementor being deprecated.
Count the evaluations of a particular problem. |
| public static LeastSquaresProblem | Returns: the specified General Least Squares problem.the model function. Produces the computed values. model, final RealVector the observed (target) values observed, final RealVector the initial guess. start, final RealMatrix the weight matrix weight, final ConvergenceChecker<LeastSquaresProblem.convergence checker checker,the maximum number of times to evaluate the model maxEvaluations, final int the maximum number to times to iterate in the algorithm maxIterations, final boolean Whether the call to lazyEvaluation, final ParameterValidator Evaluation#evaluate(RealVector)
will defer the evaluation until access to the value is requested.Model parameters validator. paramValidator)Create a |
| public static LeastSquaresProblem | Returns: the specified General Least Squares problem.the model function. Produces the computed values. model, final RealVector the observed (target) values observed, final RealVector the initial guess. start, final ConvergenceChecker<LeastSquaresProblem.convergence checker checker,the maximum number of times to evaluate the model maxEvaluations, final int the maximum number to times to iterate in the algorithm maxIterations)Create a |
| public static LeastSquaresProblem | Returns: the specified General Least Squares problem.the model function. Produces the computed values. model, final RealVector the observed (target) values observed, final RealVector the initial guess. start, final RealMatrix the weight matrix weight, final ConvergenceChecker<LeastSquaresProblem.convergence checker checker,the maximum number of times to evaluate the model maxEvaluations, final int the maximum number to times to iterate in the algorithm maxIterations)Create a |
| public static LeastSquaresProblem | Returns: the specified General Least Squares problem.the model function. Produces the computed values. model, final MultivariateMatrixFunction the jacobian of the model with respect to the parameters jacobian, final double[] the observed (target) values observed, final double[] the initial guess. start, final RealMatrix the weight matrix weight, final ConvergenceChecker<LeastSquaresProblem.convergence checker checker,the maximum number of times to evaluate the model maxEvaluations, final int the maximum number to times to iterate in the algorithm maxIterations)Create a |
| public static ConvergenceChecker | Returns: a convergence checker that delegates tochecker.the convergence checker to adapt. checker)View a convergence checker specified for a |
| public static MultivariateJacobianFunction | Returns: a function that computes both at the same timethe vector value function value, final MultivariateMatrixFunction the Jacobian function jacobian)Combine a |
| private static RealMatrix | Returns: the square-root of the weight matrix.Symmetric, positive-definite (weight) matrix. m)Computes the square-root of the weight matrix. |
| public static LeastSquaresProblem | weightDiagonal(final LeastSquaresProblem
the unweighted problem problem, final RealVector the diagonal of the weight matrix weights)Apply a diagonal weight matrix to the |
| public static LeastSquaresProblem | weightMatrix(final LeastSquaresProblem
the unweighted problem problem, final RealMatrix the matrix of weights weights)Apply a dense weight matrix to the |
| LeastSquaresFactory | back to summary |
|---|---|
| private LeastSquaresFactory() Prevent instantiation. | |
| countEvaluations | back to summary |
|---|---|
| public static LeastSquaresProblem countEvaluations(final LeastSquaresProblem problem, final Incrementor counter)
Deprecated as a consequence of Count the evaluations of a particular problem. The
| |
| create | back to summary |
|---|---|
| public static LeastSquaresProblem create(final MultivariateJacobianFunction model, final RealVector observed, final RealVector start, final RealMatrix weight, final ConvergenceChecker<LeastSquaresProblem. Create a
| |
| create | back to summary |
|---|---|
| public static LeastSquaresProblem create(final MultivariateJacobianFunction model, final RealVector observed, final RealVector start, final ConvergenceChecker<LeastSquaresProblem. Create a
| |
| create | back to summary |
|---|---|
| public static LeastSquaresProblem create(final MultivariateJacobianFunction model, final RealVector observed, final RealVector start, final RealMatrix weight, final ConvergenceChecker<LeastSquaresProblem. Create a
| |
| create | back to summary |
|---|---|
| public static LeastSquaresProblem create(final MultivariateVectorFunction model, final MultivariateMatrixFunction jacobian, final double[] observed, final double[] start, final RealMatrix weight, final ConvergenceChecker<LeastSquaresProblem. Create a
This factory method is provided for continuity with previous interfaces. Newer
applications should use
| |
| evaluationChecker | back to summary |
|---|---|
| public static ConvergenceChecker View a convergence checker specified for a
| |
| model | back to summary |
|---|---|
| public static MultivariateJacobianFunction model(final MultivariateVectorFunction value, final MultivariateMatrixFunction jacobian) Combine a
| |
| squareRoot | back to summary |
|---|---|
| private static RealMatrix squareRoot(final RealMatrix m) Computes the square-root of the weight matrix.
| |
| weightDiagonal | back to summary |
|---|---|
| public static LeastSquaresProblem weightDiagonal(final LeastSquaresProblem problem, final RealVector weights) Apply a diagonal weight matrix to the
| |
| weightMatrix | back to summary |
|---|---|
| public static LeastSquaresProblem weightMatrix(final LeastSquaresProblem problem, final RealMatrix weights) Apply a dense weight matrix to the
| |
LeastSquaresProblem.
| Modifier and Type | Class and Description |
|---|---|
| private static class | LeastSquaresFactory.
Container with the model lazy evaluation at a particular point. |
| private static class | LeastSquaresFactory.
Container with the model evaluation at a particular point. |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | lazyEvaluation
Whether to use lazy evaluation. |
| private final MultivariateJacobianFunction | model
Model function. |
| private final ParameterValidator | paramValidator
Model parameters validator. |
| private final RealVector | start
Initial guess. |
| private final RealVector | target
Target values for the model function at optimum. |
| Access | Constructor and Description |
|---|---|
| pack-priv | LocalLeastSquaresProblem(final MultivariateJacobianFunction
the model function model, final RealVector the observed data target, final RealVector the initial guess start, final ConvergenceChecker<LeastSquaresProblem.the convergence checker checker,the allowed evaluations maxEvaluations, final int the allowed iterations maxIterations, final boolean Whether the call to lazyEvaluation, final ParameterValidator Evaluation#evaluate(RealVector)
will defer the evaluation until access to the value is requested.Model parameters validator. paramValidator)Create a |
| Modifier and Type | Method and Description |
|---|---|
| public LeastSquaresProblem. | evaluate(final RealVector
the parameter values. point)Implements org. Evaluate the model at the specified point. |
| public int | getObservationSize()
Implements org. Get the number of observations (rows in the Jacobian) in this problem. |
| public int | getParameterSize()
Implements org. Get the number of parameters (columns in the Jacobian) in this problem. |
| public RealVector | getStart()
Implements org. Gets the initial guess. |
| lazyEvaluation | back to summary |
|---|---|
| private final boolean lazyEvaluation Whether to use lazy evaluation. | |
| model | back to summary |
|---|---|
| private final MultivariateJacobianFunction model Model function. | |
| paramValidator | back to summary |
|---|---|
| private final ParameterValidator paramValidator Model parameters validator. | |
| start | back to summary |
|---|---|
| private final RealVector start Initial guess. | |
| target | back to summary |
|---|---|
| private final RealVector target Target values for the model function at optimum. | |
| LocalLeastSquaresProblem | back to summary |
|---|---|
| pack-priv LocalLeastSquaresProblem(final MultivariateJacobianFunction model, final RealVector target, final RealVector start, final ConvergenceChecker<LeastSquaresProblem. Create a
| |
| evaluate | back to summary |
|---|---|
| public LeastSquaresProblem. Implements org. Doc from org. Evaluate the model at the specified point.
| |
| getObservationSize | back to summary |
|---|---|
| public int getObservationSize() Implements org. Doc from org. Get the number of observations (rows in the Jacobian) in this problem.
| |
| getParameterSize | back to summary |
|---|---|
| public int getParameterSize() Implements org. Doc from org. Get the number of parameters (columns in the Jacobian) in this problem.
| |
| getStart | back to summary |
|---|---|
| public RealVector getStart() Implements org. Doc from org. Gets the initial guess.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ValueAndJacobianFunction | model
Model and Jacobian functions. |
| private final RealVector | point
Point of evaluation. |
| private final RealVector | target
Target values for the model function at optimum. |
| Access | Constructor and Description |
|---|---|
| private | LazyUnweightedEvaluation(final ValueAndJacobianFunction
the model function model, final RealVector the observed values target, final RealVector the abscissa point)Create an |
| Modifier and Type | Method and Description |
|---|---|
| public RealMatrix | getJacobian()
Implements org. Get the weighted Jacobian matrix. |
| public RealVector | getPoint()
Implements org. Get the abscissa (independent variables) of this evaluation. |
| public RealVector | getResiduals()
Implements org. Get the weighted residuals. |
| model | back to summary |
|---|---|
| private final ValueAndJacobianFunction model Model and Jacobian functions. | |
| point | back to summary |
|---|---|
| private final RealVector point Point of evaluation. | |
| target | back to summary |
|---|---|
| private final RealVector target Target values for the model function at optimum. | |
| LazyUnweightedEvaluation | back to summary |
|---|---|
| private LazyUnweightedEvaluation(final ValueAndJacobianFunction model, final RealVector target, final RealVector point) Create an
| |
| getJacobian | back to summary |
|---|---|
| public RealMatrix getJacobian() Implements org. Doc from org. Get the weighted Jacobian matrix.
| |
| getPoint | back to summary |
|---|---|
| public RealVector getPoint() Implements org. Doc from org. Get the abscissa (independent variables) of this evaluation.
| |
| getResiduals | back to summary |
|---|---|
| public RealVector getResiduals() Implements org. Doc from org. Get the weighted residuals. The residual is the difference between the observed (target) values and the model (objective function) value. There is one residual for each element of the vector-valued function. The raw residuals are then multiplied by the square root of the weight matrix.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final RealMatrix | jacobian
Derivative at point. |
| private final RealVector | point
Point of evaluation. |
| private final RealVector | residuals
Computed residuals. |
| Access | Constructor and Description |
|---|---|
| private | UnweightedEvaluation(final RealVector
the computed function values values, final RealMatrix the computed function Jacobian jacobian, final RealVector the observed values target, final RealVector the abscissa point)Create an |
| Modifier and Type | Method and Description |
|---|---|
| public RealMatrix | getJacobian()
Implements org. Get the weighted Jacobian matrix. |
| public RealVector | getPoint()
Implements org. Get the abscissa (independent variables) of this evaluation. |
| public RealVector | getResiduals()
Implements org. Get the weighted residuals. |
| jacobian | back to summary |
|---|---|
| private final RealMatrix jacobian Derivative at point. | |
| point | back to summary |
|---|---|
| private final RealVector point Point of evaluation. | |
| residuals | back to summary |
|---|---|
| private final RealVector residuals Computed residuals. | |
| UnweightedEvaluation | back to summary |
|---|---|
| private UnweightedEvaluation(final RealVector values, final RealMatrix jacobian, final RealVector target, final RealVector point) Create an
| |
| getJacobian | back to summary |
|---|---|
| public RealMatrix getJacobian() Implements org. Doc from org. Get the weighted Jacobian matrix.
| |
| getPoint | back to summary |
|---|---|
| public RealVector getPoint() Implements org. Doc from org. Get the abscissa (independent variables) of this evaluation.
| |
| getResiduals | back to summary |
|---|---|
| public RealVector getResiduals() Implements org. Doc from org. Get the weighted residuals. The residual is the difference between the observed (target) values and the model (objective function) value. There is one residual for each element of the vector-valued function. The raw residuals are then multiplied by the square root of the weight matrix.
| |
MultivariateVectorFunction with a MultivariateMatrixFunction to produce a MultivariateJacobianFunction.
| Modifier and Type | Field and Description |
|---|---|
| private final MultivariateMatrixFunction | jacobian
Model's Jacobian. |
| private final MultivariateVectorFunction | value
Model. |
| Access | Constructor and Description |
|---|---|
| pack-priv | LocalValueAndJacobianFunction(final MultivariateVectorFunction
Model function. value, final MultivariateMatrixFunction Model's Jacobian function. jacobian)
|
| Modifier and Type | Method and Description |
|---|---|
| public RealMatrix | computeJacobian(final double[]
Point. params)Implements org. Compute the Jacobian. |
| public RealVector | computeValue(final double[]
Point. params)Implements org. Compute the value. |
| public Pair | value(final RealVector
the abscissae point)Implements org. Compute the function value and its Jacobian. |
| jacobian | back to summary |
|---|---|
| private final MultivariateMatrixFunction jacobian Model's Jacobian. | |
| value | back to summary |
|---|---|
| private final MultivariateVectorFunction value Model. | |
| LocalValueAndJacobianFunction | back to summary |
|---|---|
pack-priv LocalValueAndJacobianFunction(final MultivariateVectorFunction value, final MultivariateMatrixFunction jacobian)
| |
| computeJacobian | back to summary |
|---|---|
| public RealMatrix computeJacobian(final double[] params) Implements org. Doc from org. Compute the Jacobian.
| |
| computeValue | back to summary |
|---|---|
| public RealVector computeValue(final double[] params) Implements org. Doc from org. Compute the value.
| |
| value | back to summary |
|---|---|
| public Pair Implements org. Doc from org. Compute the function value and its Jacobian.
| |