GA options.TolFun termination
2 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
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.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!