public class NonLinearLeastSquare extends Object
| Constructor and Description |
|---|
NonLinearLeastSquare() |
NonLinearLeastSquare(Decomposition<?> decomposition,
MatrixAlgebra algebra,
double eps) |
| Modifier and Type | Method and Description |
|---|---|
DoubleMatrix |
calInverseJacobian(DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
Function<DoubleArray,DoubleMatrix> jac,
DoubleArray originalSolution)
the inverse-Jacobian where the i-j entry is the sensitivity of the ith (fitted) parameter (a_i) to the jth data
point (y_j).
|
LeastSquareResults |
solve(DoubleArray x,
DoubleArray y,
DoubleArray sigma,
ParameterizedFunction<Double,DoubleArray,Double> func,
DoubleArray startPos)
Use this when the model is in the ParameterizedFunction form and analytic parameter sensitivity is not available
but an array of measurements errors is.
|
LeastSquareResults |
solve(DoubleArray x,
DoubleArray y,
DoubleArray sigma,
ParameterizedFunction<Double,DoubleArray,Double> func,
ParameterizedFunction<Double,DoubleArray,DoubleArray> grad,
DoubleArray startPos)
Use this when the model is in the ParameterizedFunction form and analytic parameter sensitivity and measurement
errors are available.
|
LeastSquareResults |
solve(DoubleArray x,
DoubleArray y,
double sigma,
ParameterizedFunction<Double,DoubleArray,Double> func,
DoubleArray startPos)
Use this when the model is in the ParameterizedFunction form and analytic parameter sensitivity is not available
but a measurement error is.
|
LeastSquareResults |
solve(DoubleArray x,
DoubleArray y,
double sigma,
ParameterizedFunction<Double,DoubleArray,Double> func,
ParameterizedFunction<Double,DoubleArray,DoubleArray> grad,
DoubleArray startPos)
Use this when the model is in the ParameterizedFunction form and analytic parameter sensitivity and a single
measurement error are available.
|
LeastSquareResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
DoubleArray startPos)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
DoubleArray startPos,
DoubleArray maxJumps)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
Function<DoubleArray,DoubleMatrix> jac,
DoubleArray startPos)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
Function<DoubleArray,DoubleMatrix> jac,
DoubleArray startPos,
DoubleArray maxJumps)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
Function<DoubleArray,DoubleMatrix> jac,
DoubleArray startPos,
Function<DoubleArray,Boolean> constraints,
DoubleArray maxJumps)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareResults |
solve(DoubleArray x,
DoubleArray y,
ParameterizedFunction<Double,DoubleArray,Double> func,
DoubleArray startPos)
Use this when the model is in the ParameterizedFunction form and analytic parameter sensitivity is not available.
|
LeastSquareResults |
solve(DoubleArray x,
DoubleArray y,
ParameterizedFunction<Double,DoubleArray,Double> func,
ParameterizedFunction<Double,DoubleArray,DoubleArray> grad,
DoubleArray startPos)
Use this when the model is in the ParameterizedFunction form and analytic parameter sensitivity.
|
LeastSquareResults |
solve(DoubleArray observedValues,
Function<DoubleArray,DoubleArray> func,
DoubleArray startPos)
Use this when the model is given as a function of its parameters only (i.e.
|
public NonLinearLeastSquare()
public NonLinearLeastSquare(Decomposition<?> decomposition, MatrixAlgebra algebra, double eps)
public LeastSquareResults solve(DoubleArray x, DoubleArray y, ParameterizedFunction<Double,DoubleArray,Double> func, DoubleArray startPos)
x - Set of measurement pointsy - Set of measurement valuesfunc - The model in ParameterizedFunction form (i.e. takes measurement points and a set of parameters and
returns a model value)startPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray x, DoubleArray y, double sigma, ParameterizedFunction<Double,DoubleArray,Double> func, DoubleArray startPos)
x - Set of measurement pointsy - Set of measurement valuessigma - y Set of measurement errorsfunc - The model in ParameterizedFunction form (i.e. takes measurement points and a set of parameters and
returns a model value)startPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray x, DoubleArray y, DoubleArray sigma, ParameterizedFunction<Double,DoubleArray,Double> func, DoubleArray startPos)
x - Set of measurement pointsy - Set of measurement valuessigma - Set of measurement errorsfunc - The model in ParameterizedFunction form (i.e. takes measurement points and a set of parameters and
returns a model value)startPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray x, DoubleArray y, ParameterizedFunction<Double,DoubleArray,Double> func, ParameterizedFunction<Double,DoubleArray,DoubleArray> grad, DoubleArray startPos)
x - Set of measurement pointsy - Set of measurement valuesfunc - The model in ParameterizedFunction form (i.e. takes a measurement points and a set of parameters and
returns a model value)grad - The model parameter sensitivities in ParameterizedFunction form (i.e. takes a measurement points and a
set of parameters and returns a model parameter sensitivities)startPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray x, DoubleArray y, double sigma, ParameterizedFunction<Double,DoubleArray,Double> func, ParameterizedFunction<Double,DoubleArray,DoubleArray> grad, DoubleArray startPos)
x - Set of measurement pointsy - Set of measurement valuessigma - Measurement errorsfunc - The model in ParameterizedFunction form (i.e. takes a measurement points and a set of parameters and
returns a model value)grad - The model parameter sensitivities in ParameterizedFunction form (i.e. takes a measurement points and a
set of parameters and returns a model parameter sensitivities)startPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray x, DoubleArray y, DoubleArray sigma, ParameterizedFunction<Double,DoubleArray,Double> func, ParameterizedFunction<Double,DoubleArray,DoubleArray> grad, DoubleArray startPos)
x - Set of measurement pointsy - Set of measurement valuessigma - Set of measurement errorsfunc - The model in ParameterizedFunction form (i.e. takes a measurement points and a set of parameters and
returns a model value)grad - The model parameter sensitivities in ParameterizedFunction form (i.e. takes a measurement points and a
set of parameters and returns a model parameter sensitivities)startPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray observedValues, Function<DoubleArray,DoubleArray> func, DoubleArray startPos)
observedValues - Set of measurement valuesfunc - The model as a function of its parameters onlystartPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, DoubleArray startPos)
observedValues - Set of measurement valuessigma - Set of measurement errorsfunc - The model as a function of its parameters onlystartPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, DoubleArray startPos, DoubleArray maxJumps)
observedValues - Set of measurement valuessigma - Set of measurement errorsfunc - The model as a function of its parameters onlystartPos - Initial value of the parametersmaxJumps - A vector containing the maximum absolute allowed step in a particular direction in each iteration.
Can be null, in which case no constant
on the step size is applied.public LeastSquareResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, Function<DoubleArray,DoubleMatrix> jac, DoubleArray startPos)
observedValues - Set of measurement valuessigma - Set of measurement errorsfunc - The model as a function of its parameters onlyjac - The model sensitivity to its parameters (i.e. the Jacobian matrix) as a function of its parameters onlystartPos - Initial value of the parameterspublic LeastSquareResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, Function<DoubleArray,DoubleMatrix> jac, DoubleArray startPos, DoubleArray maxJumps)
observedValues - Set of measurement valuessigma - Set of measurement errorsfunc - The model as a function of its parameters onlyjac - The model sensitivity to its parameters (i.e. the Jacobian matrix) as a function of its parameters onlystartPos - Initial value of the parametersmaxJumps - A vector containing the maximum absolute allowed step in a particular direction in each iteration.
Can be null, in which case on constant
on the step size is applied.public LeastSquareResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, Function<DoubleArray,DoubleMatrix> jac, DoubleArray startPos, Function<DoubleArray,Boolean> constraints, DoubleArray maxJumps)
observedValues - Set of measurement valuessigma - Set of measurement errorsfunc - The model as a function of its parameters onlyjac - The model sensitivity to its parameters (i.e. the Jacobian matrix) as a function of its parameters onlystartPos - Initial value of the parametersconstraints - A function that returns true if the trial point is within the constraints of the modelmaxJumps - A vector containing the maximum absolute allowed step in a particular direction in each iteration.
Can be null, in which case on constant
on the step size is applied.public DoubleMatrix calInverseJacobian(DoubleArray sigma, Function<DoubleArray,DoubleArray> func, Function<DoubleArray,DoubleMatrix> jac, DoubleArray originalSolution)
sigma - Set of measurement errorsfunc - The model as a function of its parameters onlyjac - The model sensitivity to its parameters (i.e. the Jacobian matrix) as a function of its parameters onlyoriginalSolution - The value of the parameters at a converged solutionCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.