Difference between maxiter and maxfun parameters in function fmin_l_bfgs_b

1

No function help :

maxfun : int
Maximum number of function evaluations.
maxiter : int
Maximum number of iterations.

But what is the maximum number of iterations and the function evaluation number?

For me, the number of iterations was directly related to the number of evaluations of the function, but they give different results. How is the number of function evaluations calculated?

    
asked by anonymous 03.05.2017 / 14:54

1 answer

0

I may be wrong, but when you optimize a function, you may have to evaluate the optimal value of the outputs, performing various evaluations at each iteration.

In an interaction of the L-BFGS-B algorithm you may have to perform (and often do) multiple evaluations / comparisons of values until you reach the optimal value for the parameters.

The maxiter parameter controls the number of iterations the algorithm can perform.

The parameter maxfun , refers to the number of evaluations / comparisons that the algorithm can make, at each iteration, about the objective function.

Or in other words:

The process of optimizing a function may require the optimizer to evaluate the value of the objective function several times with different sets of parameters.

The maximum number of interactions that the optimizer can run is controlled by the maxiter parameter.

The maximum number of times that the objective function can be evaluated / tested, with different sets of parameters, is controlled by the parameter maxfun .

For example:

We know that the execution of the optimization algorithm in a certain objective function will take 10 interactions, with each interaction requiring evaluation of the values obtained by 5 times, until reaching the optimal value.

Then we have that maxiter must equal 10 and maxfun equal 10 * 5 = 50.

Otherwise the function will not rotate the minimum number of times to have its parameters optimized.

    
03.05.2017 / 16:53