Extracting Best Plot from Genetic Algorithm

3 views (last 30 days)
I finished optimizing my problem using GA. As far as the inbuilt plots go i am able to plot the Best fitness (@gaplotbestf)..
I understand this Best Fitness is the best fitness of all the generations put together and for a minimizing problem if the fitness of a certain generation is higher than the previous generation the fitness of the previous generation is carried over.
I know this might be a little confusing but bear with me... For Example.. For a minimizing problem the fitness of generation 50 is 5.3e-08, if the fitness of generation 51 is 8e-08 the best fitness will plot the same fitness for gen 50 as gen 51, since the fitness does not get better it will just copy over the previous fitness.If later on at generation 52 the fitness is 4.6e-08 then there will be a sudden drop in the graph.
I would like to know if i can extract the fitness specific generations?
I would like to do the same for the Current Best Individual Plot (@gaplotbestindiv) as well.
If i have a population of 200, and with Elitism ON i will carry forward (5%) 10 Best Results from the previous population and then crossover and mutate them. I would like to capture the best result of an individual prior to them being crossover'ed and mutated.
How should i go about attempting this?

Answers (0)

Community Treasure Hunt

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

Start Hunting!