How to plot the best individual fitness in GA?

10 次查看(过去 30 天)
I would like to ask if there is a way to plot the best individual fitness value instead of its score vs the generation number, when using the GA with integer and non-linear constraints.
  1 个评论
Chaman Dewangan
Chaman Dewangan 2020-5-18
I search and find hint in mathworks.com
options = optimoptions('ga','ConstraintTolerance',1e-6,'PlotFcn', @gaplotbestf);

请先登录,再进行评论。

采纳的回答

Alan Weiss
Alan Weiss 2014-12-29
You can use an output function or plot function to plot anything you want. See this example of a custom plot function in ga and the details of the plot function syntax and State Structure. The state.Population field contains the current population, and you can compute the fitness value for members of the population within the plot function.
Alan Weiss
MATLAB mathematical toolbox documentation

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by