Interface UnconstrainedLeastSquares<S extends DMatrix>
- All Superinterfaces:
IterativeOptimization
,Serializable
,UnconstrainedLeastSquaresBase<S,
,FunctionNtoMxN<S>> VerbosePrint
- All Known Implementing Classes:
UnconLeastSqLevenbergMarquardt_F64
,UnconLeastSqTrustRegion_F64
Non-linear least squares problems have a special structure which can be taken advantage of for optimization.
The least squares problem is defined below:
F(x) = 0.5*sum( i=1:M ; fi(x)2 )
where fi(x) is a function from ℜN to ℜ. M is number of functions, and N
is number of fit parameters. M ≥ N
fi(x) = observed - predicted, which is known as the residual error.
F-Test: ftol ≤ 1 - f(x+p)/f(x)
G-Test: gtol ≤ ||g(x)||inf
An absolute f-test can be done by checking the value of UnconstrainedLeastSquaresBase.getFunctionValue()
in each iteration.
NOTE: The function computes the M outputs of the fi(x), residual error functions, NOT [fi(x)]2
FORMATS:
Input functions are specified using FunctionNtoM
for the set of M
functions, and FunctionNtoMxN
for the Jacobian. The function's output is a vector of length M,
where element i correspond to function i's output. The Jacobian is an array containing the partial
derivatives of each function. Element J(i,j) corresponds to the partial of function i and parameter j.
The array is stored in a row major format. The partial for F(i,j) would be stored at index = i*N+j in the data array.
NOTE: If you need to modify the optimization parameters this can be done inside the 'function'.
-
Method Summary
Methods inherited from interface org.ddogleg.optimization.IterativeOptimization
isConverged, isUpdated, iterate, setVerbose
Methods inherited from interface org.ddogleg.optimization.UnconstrainedLeastSquaresBase
getFunctionValue, getJacobianType, getParameters, initialize, setFunction, setLoss, setPostUpdate
Methods inherited from interface org.ddogleg.struct.VerbosePrint
setVerbose