Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Optimizer
See also: nelmin

Function: bfgs
Description: Searches the global minimum of a function.

Reference(s):

Usage: x = bfgs (x0, f, df, maxiter {,eps, gamma})
Input:
x0 n x 1 vector of starting value
f text, name of the procedure where the function is defined
df text, name of the procedure where the derivative of the function is defined
maxiter integer, maximal number of iterations
eps scalar, bfgs stops, if df(x_i) < eps (i=1...n) (default = 1.0e-03)
gamma scalar, starting value for linesearch (default = 1.0)
Output:
x.minimum n x 1 vector, coordinates of the minimum found
x.iter integer, number of iterations needed
x.converged 1 if the algorithm has converged and 0 if it has not

Example:



proc (y) = f(x)

  y = sum((x-2)^2)    

endp



proc (y) = df (x)

  y = 2*(x-2)    

endp      



x0=#(1,1,1)

bfgs(x0,"f","df",50)

//alternative bfgs may be called with text variables

f1="f"  ; define f as text variable containing string "f1"

bfgs(x0, f1, "df", 50)

Result:



Contents of bfgs.minimum

[1,]        2 

[2,]        2 

[3,]        2 

Contents of bfgs.iter

[1,]        1 

Contents of bfgs.converged

[1,]        1 

Contents of bfgs.minimum

[1,]        2 

[2,]        2 

[3,]        2 

Contents of bfgs.iter

[1,]        1 

Contents of bfgs.converged

[1,]        1 


Group: Optimizer
See also: nelmin

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

(C) MD*TECH Method and Data Technologies, 21.9.2000