GA options.TolFun termination

2 views (last 30 days)
Paul
Paul on 18 Aug 2015
Edited: Paul on 20 Aug 2015
Hello,
I am running a customized GA, with options.StallGen = 25. I did not define the options.TolFun, so I assume it will take the default value of 1e-6. When running, matlab terminates the function saying: 'Optimization terminated: average change in the fitness value less than options.TolFun.'. However, the average change was only 0.1074, not 1e-6. What am I missing here?
My options set looks like:
options = gaoptimset('PopulationType', 'custom');
options = gaoptimset(options,'CreationFcn',@CreatePopulation7, ...
'CrossoverFcn',@Crossover7_prior21and61, ...
'MutationFcn',@Mutation7, ...
'Generations',10000,'PopulationSize',250, 'StallGen',25, ...
'Timelimit',72*3600,'Vectorized','off','Display','iter',...
'FitnessScalingFcn',{@fitscalingshiftlinear []},...
'SelectionFcn',@selectionstochunif,...
'Plotinterval',5,'PlotFcns',@gaplotrange);
The output set for which it terminates is shown below:
Anybody knows what I am missing here?
With kind regards,
Paul

Answers (1)

Walter Roberson
Walter Roberson on 18 Aug 2015
"Tolfun Positive scalar. The algorithm stops if the average relative change in the best fitness function value over StallGenLimit generations is less than or equal to TolFun."
Notice it is a relative change, not an absolute change.
  1 Comment
Paul
Paul on 20 Aug 2015
Edited: Paul on 20 Aug 2015
Hey Walter,
Thanks for your answer. However if I interpret that statement correctly, there are 2 things that do not satisfy this rule in my case:
1. The StallGen at which it terminates is only 8, while options.StallGen = {25}
2. The average change of the best solution between the first generation and the last generation is 1 - 2.037e4/2.282e4 = 0.107, i.e. around 10%.
Am I missing somethere here?

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!