the meaning of 'MaxFunEvals' in 'fmincon'
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Elvin Su
am 2 Mai 2014
Bearbeitet: Friedrich
am 2 Mai 2014
Hello,
The description of the argument 'MaxFunEvals' for 'fmincon' is 'Maximum number of function evaluations allowed.' I don't know which function it is referring to. Can someone help explain it in more details?
Thanks a lot!
Sincerely
Elvin
0 Kommentare
Akzeptierte Antwort
Friedrich
am 2 Mai 2014
Hi,
it refers to the objective function, e.g.
fmincon(@myfun,....)
and setting MaxFunEvals to 1000 would mean that the fmincon function stops optimizing after calling 1000 times myfun (as long no other stop creatia was hit).
2 Kommentare
Friedrich
am 2 Mai 2014
Bearbeitet: Friedrich
am 2 Mai 2014
Hi,
it can be called multiple times and each call counts as function evaluation. You also can call the objective function to calcualte the finite differences (gradient). Maybe have a look here.
Whenever, MATLAB starts an optimization routine, a solver begins at an initial value x0, performs some intermediate calculations that eventually lead to a new point x1, and then repeats the process to find successive approximations x2, x3, ... of the local minimum. Processing stops after some number of iterations k.
At any step, intermediate calculations may involve evaluating the objective function and constraints, if any, at points near the current iterate xi. For example, the solver may estimate a gradient by finite differences. At each of these nearby points, the function count (F-count) is increased by one.
It's important to note that there are no checks for MaxFunEvals throughout each step of an optimization algorithm. Doing so adds unnecessary time. Rather, most (all) algorithms check at the beginning or end of an iteration.
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!