Using fminsearch, difference between max iteration and max function evaluations.

21 visualizzazioni (ultimi 30 giorni)
I would like to know the difference MaxFuncevals and MaxIter using "fminsearch".
Could you give me an examples that using MaxFuncvals and Maxiter? (for example, max iter equals 10, fmimsearch functions calcaulates 10times ans it is same that if I set the maxFuncvals equals to 10. isn't it?)
(You can define these parameters using the optimset function. fminsearch uses these options structure fields: <--help) but I heard that it is possible that we can set the MaxIter without structure.
In the help, there are 3 examples using fminsearch function but there is no answer in these examples

Risposta accettata

Matt J
Matt J il 28 Apr 2014
Modificato: Matt J il 28 Apr 2014
fminsearch uses the Nelder Mead algorithm. As you will see at the link, the Nelder Mead algorithm requires the evaluation of the function at a number of different points in each iteration. Therefore, the number of iterations and the number of function evaluations are not the same.
MaxIter puts a limit on the number of iterations, i.e., the number of different solution guesses x_n generated. MaxFunEvals, meanwhile, gives you finer control, putting a limit on the total number of function evaluations in the whole process.
  1 Commento
Alan Weiss
Alan Weiss il 28 Apr 2014
There was a similar discussion about the difference between function evaluation and iteration for the simulated annealing solver. While the solver is different, perhaps you will find the discussion enlightening:
Alan Weiss
MATLAB mathematical toolbox documentation

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by