bfgsmin

bfgsmin is called as

$\displaystyle [theta,\, value,\, convergence]=bfgsmin(''f'',\,\{ args\},\,\{ control\})$

The first argument $ ''f''$ is a string variable that holds the name of the function to be minimized. The second argument, $ args$, is a cell array that hold the arguments of $ f$. The third argument $ control$ is an optional cell array of $ 4$ elements. The elements of $ control$ are described in Table 1.

Table 1: Controls for bfgsmin
Element Purpose Default Value Other possible values
1


The outputs of bfgsmin are obvious, except the code values that $ convergence$ can take on. These are -1 for no convergence, maxiters exceeded; 1: convergence according to the specified strong or weak criterion; 2: no convergence due to failure of the algorithm (e.g., the gradient calculation fails, or a stepsize cannot be found).

Consider a simple example - minimizing a quadratic function. The program bfgsmin-example.m follows:

/home/sh/Dokumenter/octave/octave-forge/main/optim/doc/bfgsmin-example.m

The output of running this example is


/home/sh/Dokumenter/octave/octave-forge/main/optim/doc/bfsg-example.out
Notice that analytic gradients lead to faster convergence that do numeric gradients. Also note in the third example, where minarg=2, that minimization can be with respect to any of the arguments of the objective function.

Søren Hauberg 2008-04-29