ILNumerics - Technical Application Development
Assembly: ILNumerics.Toolboxes.Optimization (in ILNumerics.Toolboxes.Optimization.dll) Version: 5.5.0.0 (5.5.7503.3146)
A local minimizer of func, length: n
Find minimizer of a large-scale unconstrained multivariable nonlinear optimization problem
[ILNumerics Optimization Toolbox]
Namespace: ILNumerics.Toolboxes
Assembly: ILNumerics.Toolboxes.Optimization (in ILNumerics.Toolboxes.Optimization.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax
public static RetArray<double> fminunconst_lbfgs( OptimizationObjectiveFunction<double> objfunc, InArray<double> x0, int maxIter = 500, OptimizationDerivativeFunction<double> gradientFunc = null, OutArray<double> iterations = null, OutArray<double> gradientNorm = null, OutArray<int> iterationCount = null, Nullable<double> tol = null, Nullable<double> tolX = null )
Parameters
- objfunc
- Type: ILNumerics.ToolboxesOptimizationObjectiveFunctionDouble
Cost function to be minimized, defined from Rn to R - x0
- Type: ILNumericsInArrayDouble
Initial solution guess, lenght: (Rn). Specifies the starting point for the search. - maxIter (Optional)
- Type: SystemInt32
[optional] Maximal number of iterations allowed. Default: 500 - gradientFunc (Optional)
- Type: ILNumerics.ToolboxesOptimizationDerivativeFunctionDouble
[optional] Function used to compute the gradient. Default: null (finite differences via jacobian_prec) - iterations (Optional)
- Type: ILNumericsOutArrayDouble
[optional] Output array of intermediate positions at each iteration. Default: null (not provided) - gradientNorm (Optional)
- Type: ILNumericsOutArrayDouble
[optional] Output: Request the gradient norms at each iteration. Default: null (do not compute) - iterationCount (Optional)
- Type: ILNumericsOutArrayInt32
[Output] Number of effective iterations during the computation - tol (Optional)
- Type: SystemNullableDouble
[optional] Exit tolerance on the gradient. Default: DefaultTolerance (1e-8) - tolX (Optional)
- Type: SystemNullableDouble
[optional] Exit the iterations when the solution is not significantly changing anymore. Default: DefaultTolerance (1e-8)
Return Value
Type: RetArrayDoubleA local minimizer of func, length: n
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | If objfunc is not defined at x0 or if objfunc was found to be non-scalar |
ArgumentNullException | If one of x0 or objfunc was null on entry |
Remarks
This functino finds a minimizer of a large-scale unconstrained multivariable nonlinear optimization problem without evaluating the hessian matrix explicitely. For large scale problems with a large number of variables and commonly sparse derivatives, an advantageous performance scheme is achieved which allows the minimizer to be found efficiently without the need of the computation of all hessian elements explicitly.
If x0 is empty, an empty array of the same size will be returned.
[ILNumerics Optimization Toolbox]
Examples
Array<double> x0 = -8 *ILMath.ones(2, 1); // initial guess for the solution Array<double> Mini = Optimization.fminunconst_lbfgs(SampleFunction, x0); // minimizer of the SampleFuntion in two dimensions; //Sample function definition public static RetArray<double> SampleFunction(InArray<double> A) { using (Scope.Enter(A)) { return 2 * x[0] * x[0] + x[0] * x[1] + 2 * x[1] * x[1] - 6 * x[0] - 6 * x[1] + 15; } }
See Also