Thread Subject: Problem with 'lsqnonlin' function

Subject: Problem with 'lsqnonlin' function

From: miki lo

Date: 28 Jan, 2008 12:41:27

Message: 1 of 6

Hello,
I am trying to do a non-linear fit using the 'lsqnonlin' Matlab function.
Some times the termination is successful and I get a message that:
Optimization terminated: relative function value changing by less than OPTIONS.TolFun.
However, there are times where I get the following termination message:
Optimization terminated: first-order optimality less than OPTIONS.TolFun,
 and no negative/zero curvature detected in trust region model.

What does it mean?
I tried looking at the Matlab help of the function but couldn't understand what this message is supposed to tell me?

Thank you

Subject: Problem with 'lsqnonlin' function

From: Bruno Luong

Date: 28 Jan, 2008 12:55:05

Message: 2 of 6

miki lo <myartsev@gmail.com> wrote in message
>
> What does it mean?
> I tried looking at the Matlab help of the function but
couldn't understand what this message is supposed to tell me?
>
> Thank you

That means MATLAB could not evaluate the gradient accurately
at the convergence precision that was asked for. It likely a
roundoff problem.

Do you provide the gradient of your cost function, or do you
let MATLAB computes it (by finite difference IIRC)?

Bruno

Subject: Problem with 'lsqnonlin' function

From: miki lo

Date: 28 Jan, 2008 13:17:21

Message: 3 of 6

No, I didn't specify anything I let MATLAB compute it. Does this mean that I fit was not possible (failed)?
Also, how is this message diffrent from the message:Optimization terminated: relative function value changing by less than OPTIONS.TolFun.
because I thought the later said that the convergence was good enough so it stoped no?
Thank you

Subject: Problem with 'lsqnonlin' function

From: Bruno Luong

Date: 28 Jan, 2008 13:55:03

Message: 4 of 6

miki lo <myartsev@gmail.com> wrote in message
> Also, how is this message diffrent from the
message:Optimization terminated: relative function value
changing by less than OPTIONS.TolFun.
> because I thought the later said that the convergence was
good enough so it stoped no?

I as said before, the warning message is about gradient
evaluation that is no longer consistent with cost function
due to round-off problem. In this case, minimization
algorithm cannot go any further (it usually makes an orbit
around a local minima).

Bruno



Subject: Problem with 'lsqnonlin' function

From: miki lo

Date: 28 Jan, 2008 14:08:01

Message: 5 of 6

Ok, thank you.
Just to verify, the message:
Optimization terminated: relative function value changing by less than OPTIONS.TolFun
means that the it WAS ABLE to make the fit, right?

Subject: Problem with 'lsqnonlin' function

From: Bruno Luong

Date: 28 Jan, 2008 14:39:02

Message: 6 of 6

miki lo <myartsev@gmail.com> wrote in message
> Just to verify, the message:
> Optimization terminated: relative function value changing
by less than OPTIONS.TolFun
> means that the it WAS ABLE to make the fit, right?

Yes

Bruno

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
lsqnonlin pvnrt1407 pvnrt1407 13 Aug, 2008 18:21:35
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com