필터 지우기
필터 지우기

the meaning of a sentence in command window

조회 수: 1 (최근 30일)
shirin mhd
shirin mhd 2022년 3월 28일
댓글: Star Strider 2022년 3월 29일

Hi
I run a code, and it operates correctly without any error.at the end of command window i view this message:

Optimization terminated: average change in the fitness value less than options.TolFun.

does this mean that something is wrong??

채택된 답변

Star Strider
Star Strider 2022년 3월 28일
편집: Star Strider 2022년 3월 28일
The message means that the genetic algorithm converged successfully.
It has reached what it considers to be the global minimum (of the regions in the parameter spece that it has considered), and stopped.
You need to determine if the parameters ga estimated are appropriate, so for example if the problem is curve fitting (parameter estimation for a nonlinear regression) how well the estimated curve fits the data. If it does not, then repeat the optimisation with a different initial population matrix.
.
  댓글 수: 5
shirin mhd
shirin mhd 2022년 3월 29일
I really thank for your response.
Star Strider
Star Strider 2022년 3월 29일
As always, my pleasure!

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

추가 답변 (3개)

John D'Errico
John D'Errico 2022년 3월 28일
편집: John D'Errico 2022년 3월 28일
I think you are perhaps confused. And the answers are a bit confusing too. And, of course, we don't know any characteristics of your problem. Finally, people often seem to be confused at the word "terminated" in the response. Terminated is a synonym here for "done", or perhaps "finished".
So what did GA tell you? It said that
Optimization terminated: average change in the fitness value less than options.TolFun.
It went as far as it could. It was unable to find a better solution. Of course, that does not mean a better solution does not exist. But it thinks it is happy with the result. As happy as a computer program can be, at least. You gave it a tolerance that tells it when it can stop looking, and that tolerance was satisfied. I would note that this is the termination criteria that goes along with an exitflag of 1. In the world of MATLAB optimization, that is the best possible exit flag.
Again, I often see people confused when they see the word "terminated". They think of that word in a negative sense, and it definitely can have fairly negative connotations, at least these days. Here, it just means "done".
  댓글 수: 1
shirin mhd
shirin mhd 2022년 3월 29일
I appreciate your explanation. very complete and comprehensive.

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


Jan
Jan 2022년 3월 28일
편집: Jan 2022년 3월 28일
It means, that the optimizer did not found a valid solution. The value of the fitness functions does not vary more than the parameter TolFun allows, so it is considered to be noise only.
Check your fitness function. Does it really what you expect it to do? If it is correct, reduce the limit of options.TolFun .
  댓글 수: 1
shirin mhd
shirin mhd 2022년 3월 28일
thank for your attention.
I'm a little confused between your answer and the other answer. The objective function that I want to optimize is a quadratic function and i cant change that. I changed and reduced the value of Function tolerance , but my answer did not change.
does this sentense mean that i have wrong and incomplete answer?or just means that operation terminated because of this reason and i can use answer for future? and if its a kind of error what should i do for solving this?

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


Walter Roberson
Walter Roberson 2022년 3월 28일
If your function truly is a quadartic function of one variable, then:
Evaluate the function at several different x values (at least three). Then polyfit() requesting degree 2 in order to get the quadratic coefficients.
  댓글 수: 1
shirin mhd
shirin mhd 2022년 3월 29일
thank you for your attention. there is three variable in my objective function. now I think I'm aware of what is going on in my code from other answers.

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

카테고리

Help CenterFile Exchange에서 Surrogate Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by