MATLAB Answers

difference between Optimization terminated: maximum number of generations exceeded and Optimization terminated: average change in the fitness value less than .

5 views (last 30 days)
Ali Algushti
Ali Algushti on 4 Jun 2021
Commented: Ali Algushti on 4 Jun 2021
1- Optimization terminated: average change in the fitness value less than options.FunctionTolerance.
2- Optimization terminated: maximum number of generations exceeded.
the meaning of both and the difference, also which result is better.

Answers (1)

Alan Weiss
Alan Weiss on 4 Jun 2021
1 means that the process has stalled, and whether this is good or bad depends on what you want. If the stall window is large, then it means that the solver is not improving, and so maybe it is time to stop.
2 means that the solver was still improving, but got stopped by a generations limit. So maybe you are tired of it running, or maybe you should increase the limit so it can improve some more.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 Comment
Ali Algushti
Ali Algushti on 4 Jun 2021
Maybe you can help me with this.
Thank you.
https://it.mathworks.com/matlabcentral/answers/847660-opts-optimoptions-ga-populationsize-150-maxgenerations-200-elitecount-10-whi?s_tid=srchtitle

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by