現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
MATLAB Result Figure for genetic algorithm
3 ビュー (過去 30 日間)
古いコメントを表示
Maryam
2019 年 10 月 17 日
Hi all,
I have a question about the plot that MATLAB creates runnig genetic algorithm. The vertical axis shows the "number of individuals" and the horizontal axis shows "score". In Mathwork website, I found the definition for these as below:
- number of individuals: number of population in each generation
- score: fitness function or objective function value
My questions are:
- Is the the diagram shows the values correspond to all of the iterations from start to end, or it just shows the values for the last iteration?
- Based on my understanding the "population size" should remain the same for all the generations, if this is correct why it keeps changing in this diagram?
Thank you so much for your time and consideration.
16 件のコメント
Walter Roberson
2019 年 10 月 17 日
Which of the plot options are you using? https://www.mathworks.com/help/gads/genetic-algorithm-options.html#f14474
Maryam
2019 年 10 月 17 日
I believe I used 'gaplotscores'. Below is the example of my resaults. Please note that the lower diagram, not the upper one, is the one I'm refering to!

Walter Roberson
2019 年 10 月 17 日
The lower one is a histogram with scores on the x and number of entries in the population with that score vertically. It refers to the current generation.
Maryam
2019 年 10 月 17 日
Thanks for the explanation. So the score is the objective function value? Also when you say number of entries in population you mean the number of population? If not what exactly you mean by that?
Walter Roberson
2019 年 10 月 17 日
The number of individuals in the population whose score falls within a range is on the y axes.
At the moment I do not know if score is objective function value or that value modified to penalize constraint violations.
Maryam
2019 年 10 月 17 日
Oh that clears up a lot. Basically it does not show all the population, but it only shows the certain number of population which have that certain score!
I don’t have any constraints! Also it is a non-integer problem, so I believe the score shows the objective function value. If this is the case, it means that at the last iteration the number of population with the objective function value are zero?! Or non of the population members falls within the objective function value?! (Isn’t this mean we have not reached the right answer?)
Maryam
2019 年 10 月 17 日
And because I have control on my variables I know the final answer is correct!
Walter Roberson
2019 年 10 月 17 日
ga() stops processing under a number of different circumstances. It would not be typical that the entire population has converged to the same solution. It would be more typical that the best score had not decreased for a number of iterations.
Maryam
2019 年 10 月 17 日
Thanks so much for taking your time answering my question. I do appreciate it. I just wanna make sure I understood completely. Based on my understanding, the low diagram shows the last iteration (not all the iterations), and it shows the score of different individual in the population. For example, 35 of the population falls within the first range score. And the second bar shows almost 4 of the population have the score of second range. Correct?
I again thank you so very much for your explanation and highly appreciate your answers!
Walter Roberson
2019 年 10 月 17 日
Yes, I agree, about 35 of the population is in the first score range, and 3 or 4 are in the second score range.
Maryam
2019 年 10 月 19 日
Sorry one more question: does this diagram shows all of the individuals in the population? If not why? And if not how many are the individuals are shown in the figure, any rules for that?
Thanks again so much!
Walter Roberson
2019 年 10 月 19 日
I am not sure at the moment. If the first bin is 37 then it looks like the total is 50.
Maryam
2019 年 10 月 19 日
Thank you. So you believe the figure shows all the individuals in population correct (which in this example is about 50)?
Walter Roberson
2019 年 10 月 19 日
I think that one does but I cannot be sure at the moment that one outlier did not get dropped. I would need to dig into the code.
Maryam
2019 年 10 月 19 日
Okay. Is there any reason for MATLAB to drop an outlier? I mean is there a rule or something or it just random?
I do appreciate you answering my questions patiently!
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)
