An overview of the toolbox designed for minimize functions.
This toolbox contains two functions : opti_gradientWolfe(x0,sim,kmax,eps) and opti_BFGS(x0,sim,kmax,eps).
The goal of this toolbox is to provide two optimization functions to minimize functions. The first opti_gradientWolfe uses the Gradient descent (and the Wolfe algorithm), and the second one uses the BFGS method. This two functions are used to minimize functions.
The following functions are available.
x0 represents the initial point used for iterating.
sim represents the function to minimize. sim(x) has to give the evaluation of the simulated function at x but also the gradient at x. See the exemple for more explications.
kmax represents the maximum number of iterations.
eps represents the precision of the algorithm. The algorithm will stop iterating when gradient of the current iterate become lesser than eps.
See opti_gradientWolfe arguments.
In the following example, we show how to use the opti_BFGS function on the exemple of Rosenbrock sfunction.
function [f, g]=simulateur(x) // f represents the value of Rosembrock(x) // g represents the gradient of f. if (length(x) <> 2) disp(' Incompatible dimension of the imput vector') break; else f=0; f=(1-x(1))**2 +100*(x(2)-x(1)**2)**2; g=zeros(2); g(1)= -2*(1-x(1))-400*x(1)*(x(2)- x(1)^2); g(2)= 200*(x(2)-x(1)^2); end, endfunction [sol,nite]=opti_BFGS([0,1.2]',simulateur,20000,0.01); | ![]() | ![]() |
Jonathan FAURE, 2012