public class NonLinearLeastSquareWithPenalty extends Object
| Modifier and Type | Field and Description |
|---|---|
static Function<DoubleArray,Boolean> |
UNCONSTRAINED
Unconstrained allowed function - always returns true
|
| Constructor and Description |
|---|
NonLinearLeastSquareWithPenalty()
Default constructor.
|
NonLinearLeastSquareWithPenalty(Decomposition<?> decomposition)
Constructor allowing matrix decomposition to be set.
|
NonLinearLeastSquareWithPenalty(Decomposition<?> decomposition,
double eps)
Constructor allowing matrix decomposition and convergence tolerance to be set.
|
NonLinearLeastSquareWithPenalty(Decomposition<?> decomposition,
MatrixAlgebra algebra,
double eps)
General constructor.
|
NonLinearLeastSquareWithPenalty(double eps)
Constructor allowing convergence tolerance to be set.
|
| Modifier and Type | Method and Description |
|---|---|
LeastSquareWithPenaltyResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
DoubleArray startPos,
DoubleMatrix penalty)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareWithPenaltyResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
DoubleArray startPos,
DoubleMatrix penalty,
Function<DoubleArray,Boolean> allowedValue)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareWithPenaltyResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
Function<DoubleArray,DoubleMatrix> jac,
DoubleArray startPos,
DoubleMatrix penalty)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareWithPenaltyResults |
solve(DoubleArray observedValues,
DoubleArray sigma,
Function<DoubleArray,DoubleArray> func,
Function<DoubleArray,DoubleMatrix> jac,
DoubleArray startPos,
DoubleMatrix penalty,
Function<DoubleArray,Boolean> allowedValue)
Use this when the model is given as a function of its parameters only (i.e.
|
LeastSquareWithPenaltyResults |
solve(DoubleArray observedValues,
Function<DoubleArray,DoubleArray> func,
DoubleArray startPos,
DoubleMatrix penalty)
Use this when the model is given as a function of its parameters only (i.e.
|
public static final Function<DoubleArray,Boolean> UNCONSTRAINED
public NonLinearLeastSquareWithPenalty()
OGMatrixAlgebra and a convergence tolerance of 1e-8public NonLinearLeastSquareWithPenalty(Decomposition<?> decomposition)
OGMatrixAlgebra and a convergence tolerance of 1e-8.decomposition - Matrix decomposition (see DecompositionFactory for list)public NonLinearLeastSquareWithPenalty(double eps)
OGMatrixAlgebra.eps - Convergence tolerancepublic NonLinearLeastSquareWithPenalty(Decomposition<?> decomposition, double eps)
OGMatrixAlgebra.decomposition - Matrix decomposition (see DecompositionFactory for list)eps - Convergence tolerancepublic NonLinearLeastSquareWithPenalty(Decomposition<?> decomposition, MatrixAlgebra algebra, double eps)
decomposition - Matrix decomposition (see DecompositionFactory for list)algebra - The matrix algebra (see MatrixAlgebraFactory for list)eps - Convergence tolerancepublic LeastSquareWithPenaltyResults solve(DoubleArray observedValues, Function<DoubleArray,DoubleArray> func, DoubleArray startPos, DoubleMatrix penalty)
observedValues - Set of measurement valuesfunc - The model as a function of its parameters onlystartPos - Initial value of the parameterspenalty - Penalty matrixpublic LeastSquareWithPenaltyResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, DoubleArray startPos, DoubleMatrix penalty)
observedValues - Set of measurement valuessigma - Set of measurement errorsfunc - The model as a function of its parameters onlystartPos - Initial value of the parameterspenalty - Penalty matrixpublic LeastSquareWithPenaltyResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, DoubleArray startPos, DoubleMatrix penalty, Function<DoubleArray,Boolean> allowedValue)
observedValues - Set of measurement valuessigma - Set of measurement errorsfunc - The model as a function of its parameters onlystartPos - Initial value of the parameterspenalty - Penalty matrixallowedValue - a function which returned true if the new trial position is allowed by the model. An example
would be to enforce positive parameters
without resorting to a non-linear parameter transform. In some circumstances this approach will lead to slow
convergence.public LeastSquareWithPenaltyResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, Function<DoubleArray,DoubleMatrix> jac, DoubleArray startPos, DoubleMatrix penalty)
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 parameterspenalty - Penalty matrixpublic LeastSquareWithPenaltyResults solve(DoubleArray observedValues, DoubleArray sigma, Function<DoubleArray,DoubleArray> func, Function<DoubleArray,DoubleMatrix> jac, DoubleArray startPos, DoubleMatrix penalty, Function<DoubleArray,Boolean> allowedValue)
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 parameterspenalty - Penalty matrix (must be positive semi-definite)allowedValue - a function which returned true if the new trial position is allowed by the model. An example
would be to enforce positive parameters
without resorting to a non-linear parameter transform. In some circumstances this approach will lead to slow
convergence.Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.