How to display every parameter value at every iteration while using Genetic algorithm

조회 수: 1 (최근 30일)
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
John D'Errico
John D'Errico 2017년 4월 12일
You can't just dump them out of the objective function in the command window?
Vidhyashree Nagaraju
Vidhyashree Nagaraju 2017년 4월 12일
No, it only displays the best value of the objective function but not the parameter values.

댓글을 달려면 로그인하십시오.

답변 (2개)

Alan Weiss
Alan Weiss 2017년 4월 13일
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
Vidhya Shree 2017년 4월 13일
Also, the parameter values can be simply displayed using [x,fval,output, scores,population,best]=ga[@fitnessfunction,....]

카테고리

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