How to display every parameter value at every iteration while using Genetic algorithm
Mostrar comentarios más antiguos
Hello,
I am using GA to solve for 6 parameters. I need to define constraints on this parameter like a>b, which I have done. However, I would like to define a stopping criteria for the fitness function. Not sure how to do that.
Most importantly, how can I look at the parameter values at every iteration of GA. I can use display or iter but it doesn't necessarily display the parameter values.
Thank you
2 comentarios
John D'Errico
el 12 de Abr. de 2017
You can't just dump them out of the objective function in the command window?
Vidhyashree Nagaraju
el 12 de Abr. de 2017
Respuestas (2)
Alan Weiss
el 13 de Abr. de 2017
1 voto
Use an Output Function to report whatever you like, and/or to stop the algorithm's iterations when you like.
Alan Weiss
MATLAB mathematical toolbox documentation
Vidhya Shree
el 13 de Abr. de 2017
0 votos
Also, the parameter values can be simply displayed using [x,fval,output, scores,population,best]=ga[@fitnessfunction,....]
Categorías
Más información sobre Genetic Algorithm en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!