Re: lsqcurvefit-converge?
- From: John D'Errico <woodchips@xxxxxxxxxxxxxxxx>
- Date: Fri, 18 Nov 2005 17:57:10 GMT
In article <ef1c0f5.-1@xxxxxxxxxxxxxxxx>, johnd <j.atrot@xxxxxxxx>
wrote:
> I have a problem considering lsqcurvefit as a routine to fit a number
> of data. More specifically, the analyitical expression that is
> supposed to be used to fit the data I have has 4 parameters. Let's
> say that
>
> beta=[K;D_2;w;M]; (where I set the values)
> LB=[0;0;0;0];
> UB=[10*K;3;3;1];
>
> then I ran the lscurvefit to compute the parameters ad I get : sum of
> residuals =0.016. and the warning messag
Are you truly looking at the sum of the residuals?
Or did you mean the sum of squares of the residuals?
The latter is what lsqcurvefit uses.
Note that it is quite easy to pose a problem where
the simple sum of residuals is not at all well posed.
> e 'Optimization terminated successfully:
> Relative function value changing by less than OPTIONS.TolFun'
>
> The value for D_2=0.57
> Then, I change the LB and UB to
> LB=[0;0;0;0];
> UB=[10*K;30;30;1];
> and if I run the same routine then, I get exatly the same values for
> all parameters except from D_2 and w (the parameters whose LB and UB
> have been changed)
> , the same warning message, exit flag1 as previously, same sum of
> residuals. Do you think that this sounds reasonable?
If the objective (i.e., the sum of SQUARES of the
residuals) is the same, then your problem may be
indeterminate. That is, any solution along some
path through your parameter space may be yielding
the same minimum objective. In that event it is
rather arbitrary which "solution" from this infinite
set lsqcurvefit finds. Simply changing something
trivial like a non-active bound may result in a
different final solution.
> The parameter values differ a lot in order of magnitude (for instance
> for D_2 which more important, I get 0.88 and i.52 respectively). This
> rather suggests that I shouldnt accept the solution. I guess there is
> something with the options I have to set.
It may be more likely that you need to deal with
the concept I suggested above.
> I was going through the example you use in the introduction of this
> routine and even there you get a warning though it seems that it
> terminates successfully
> "
> the optimization terminated successfully:
> First-order optimality less than OPTIONS.TolFun, and no
> negative/zero curvature detected
> "
Its not so much a warning as a statement of
convergence.
HTH,
John D'Errico
--
The best material model of a cat is another, or preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945
Those who can't laugh at themselves leave the job to others.
Anonymous
.
- Follow-Ups:
- Re: lsqcurvefit-converge?
- From: johnd
- Re: lsqcurvefit-converge?
- References:
- lsqcurvefit-converge?
- From: johnd
- lsqcurvefit-converge?
- Prev by Date: illumination elimination
- Next by Date: Re: How to break a simulink model?
- Previous by thread: lsqcurvefit-converge?
- Next by thread: Re: lsqcurvefit-converge?
- Index(es):
Relevant Pages
|