org.ddogleg.optimization
Interface UnconstrainedMinimization
-
- All Superinterfaces:
- IterativeOptimization, java.io.Serializable
- All Known Implementing Classes:
- QuasiNewtonBFGS_to_UnconstrainedMinimization
public interface UnconstrainedMinimization extends IterativeOptimization
Optimization algorithm which seeks to minimize F(X) ∈ ℜ and X ∈ ℜN
Two convergence thresholds are specified, f-test and g-test. The f-test is a relative convergence test based on the function's value and is designed to test to see when it is near the optimal solution. G-test is an absolute test based on the gradient's norm,
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 ofgetFunctionValue()in each iteration.NOTE: If you need to modify the optimization parameters this can be done inside the 'function'.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description doublegetFunctionValue()Returns the value of the objective function being evaluated at the current parameters value.double[]getParameters()After each iteration this function can be called to get the current best set of parameters.voidinitialize(double[] initial, double ftol, double gtol)Specify the initial set of parameters from which to start from.voidsetFunction(FunctionNtoS function, FunctionNtoN gradient, double minFunctionValue)Specifies the function being optimized.-
Methods inherited from interface org.ddogleg.optimization.IterativeOptimization
getWarning, isConverged, isUpdated, iterate
-
-
-
-
Method Detail
-
setFunction
void setFunction(FunctionNtoS function, FunctionNtoN gradient, double minFunctionValue)
Specifies the function being optimized. A numerical Jacobian will be computed if null is passed in.- Parameters:
function- Function being optimized.gradient- Partial derivative for each input in the function. If null a numerical gradient will be computed.minFunctionValue- Minimum possible value that 'function' can have. E.g. for least squares problems this value should be set to zero.
-
initialize
void initialize(double[] initial, double ftol, double gtol)Specify the initial set of parameters from which to start from. Call aftersetFunction(org.ddogleg.optimization.functions.FunctionNtoS, org.ddogleg.optimization.functions.FunctionNtoN, double)has been called.- Parameters:
initial- Initial parameters or guess.ftol- Relative convergence test based on function value. 0 disables test. 0 ≤ ftol<1, Try 1e-12gtol- Absolute convergence test based on gradient. 0 disables test. 0 ≤ gtol. Try 1e-12
-
getParameters
double[] getParameters()
After each iteration this function can be called to get the current best set of parameters.
-
getFunctionValue
double getFunctionValue()
Returns the value of the objective function being evaluated at the current parameters value. If not supported then an exception is thrown.- Returns:
- Objective function's value.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG