필터 지우기
필터 지우기

Genetic Algorithm and objective function value

조회 수: 4 (최근 30일)
nado
nado 2022년 11월 2일
댓글: Star Strider 2022년 11월 2일
Hello everyone,
I was doing an optimization using GA (Genetic Algorithm). After nearly one hour and half, i obtained the optimized parameters and the minimum value of the objective function.
To be sure from the solution, i put the optimized parameter in the same model and here is the surprise ! I obtained another value of the objective function !!!
Has anyone encountered this problem and knew why ?
As shows the figure below the value of the objective function is 0.114106.
However, when i put the same parameters in the main code, i obtained 0.1253 as shows the figure below.
What do you think ?

채택된 답변

Star Strider
Star Strider 2022년 11월 2일
If the objective funciton is the same as the fitness function (and I have no idea what you are doing), the result should be the same, and equal to the best fitness value. If they are different (for example in a curve-fitting problem where the norm of the difference between the data and the objective function is to be minimised), the objective function value would be expected to be different from the fitness function value.
  댓글 수: 2
nado
nado 2022년 11월 2일
i totally agree with you. That is why i find it weird.
In my case, the objective function is the same as the fitness function. In fact, the model is written in the form of a script. I copy the script and write it in the form of a function to be able to use GA.
I think the problem is in the script and i should review it.
Thanks a lot !
Star Strider
Star Strider 2022년 11월 2일
As always, my pleasure!
I have ga display all the results at the end, including the final fitness value. I am not certain what you have it display, however that might help uncover whatever the discrepancy may be. Also, if you are using a hybrid function to ‘fine-tune’ the parameters at the end, that could explain the difference.
.

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

추가 답변 (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