Can anyone help me for knowing the options of genetic algorithm?
조회 수: 48 (최근 30일)
이전 댓글 표시
How can i know what the value that i put in genetic algorithm's options ?
답변 (2개)
Star Strider
2024년 8월 20일 16:13
To list them all —
opts = optimoptions(@ga)
Change the ones you need to change. This is a structure, so to display 'FunctionTolerance' refer to it as —
FcnTol = opts.FunctionTolerance
To change it, use a similar approach —
opts.FunctionTolerance = 1E-5
.
댓글 수: 7
Star Strider
2024년 8월 21일 9:52
@noura — That depends on what the problem is, how many parameters are in the model, and the nature of the fitness function itself.
In my optimoptions structure, I include:
'PlotFcn',@gaplotbestf, 'PlotInterval',1
This tells me how the fitness is progressing.
I would have to see (and understand) your fitness function in order to provide anything further.
Steven Lord
2024년 8월 20일 20:36
Since you've said you're a beginner with MATLAB (and presumably Global Optimization Toolbox), I recommend starting off with the tutorials for how to get started with Global Optimization Toolbox on this documentation page. There are also three examples linked from that page (click the Examples link just below the blue Help Center bar running across the screen, direct link is here.) The examples don't go into the various options available to the various solvers in that much depth, as they're intended to help you get started and at least at first you may not need to change those options.
There are a few examples in the Genetic Algorithm category that go into a little more depth about those options. I'm looking specifically at "Effects of Genetic Algorithm Options". To get to that category, click on "Genetic Algorithm" on the "Get Started" Examples page (the second link above, direct link to those examples here.)
Finally, looking at the list of Self-Paced Online Courses (the "Training Courses" link from the Help Center, direct link here) I'm not 100% sure if the Optimization Onramp covers Global Optimization Toolbox as well or if it focuses mainly or solely on Optimization Toolbox. But it may be of interest and/or use to you.
댓글 수: 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!