ILNumerics Ultimate VS

Optimizationfminunconst_bfgs Method

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Find minimizer of a medium-scale unconstrained multivariable nonlinear optimization problem, using BFGS updates to the hessian matrix

[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_bfgs(
	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, length: (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(OptimizationObjectiveFunctionDouble, InArrayDouble, InArrayDouble))
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: RetArrayDouble
A local minimizer of objfunc, length: n
Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionIf objfunc is not defined at x0 or if objfunc was found to be non-scalar
ArgumentNullExceptionIf one of x0 or objfunc was null on entry
Remarks

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_bfgs(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

Reference

Other Resources