필터 지우기
필터 지우기

exit flags for lsqnonlin

조회 수: 11 (최근 30일)
David
David 2013년 10월 24일
편집: Matt J 2013년 10월 24일
Can anyone explain to me the difference between exitflags 1, 2 and 3 in lsqnonlin? I think my confusion here stems from the vague ways tolFun and tolX are described in the help files, but I'm not sure if there's more to my confusion.
Thanks,
David
  댓글 수: 1
dpb
dpb 2013년 10월 24일
For default of trust-region-reflective option it's in snls.m and the pertinent tests are--
if ((optnrm < tol1) && (posdef == 1) )
ex = 1; EXITFLAG = 1;
...
elseif (nrmsx < .9*delta) && (ratio > .25) && (diff < tol1*(1+abs(oval)))
ex = 2; EXITFLAG = 3;
...
elseif (iter > 1) && (nrmsx < tol2),
ex = 3; EXITFLAG = 2;
...
I didn't dig thru the lower levels where some of these are defined...it certainly isn't clear from the doc's just what the difference is in any meaningful fashion, agreed...

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

채택된 답변

Matt J
Matt J 2013년 10월 24일
편집: Matt J 2013년 10월 24일
exitflag=1 means that the first order optimality measure was smaller than what the code thinks is significant.
exitflag=2 means that the change in x at the last iteration was smaller than what you consider significant, as expressed through your choice of TolX.
exitflag=3 means the change in the objective function components were smaller than what you consider significant, as expressed through your choice of TolFun.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by