Re: How to solve the problem of
- From: John D'Errico <woodchips@xxxxxxxxxxxxxxxx>
- Date: Fri, 30 Mar 2007 07:49:55 -0400
In article <ef523d2.1@xxxxxxxxxxxxxxxxxxxxxxx>, bk <bkchen.eo94g@xxxxxxxxxxx> wrote:
John D'Errico wrote:
young wrote:
-------------------- Problem ------------------------------
Maximum number of function evaluations exceeded;x = lsqcurvefit(@myfun, [163 30 1000 ], xdata, ydata)
increase options.MaxFunEvals
(snip)
I have increased MaxFunEvals' value to 1e+66,but the " NOT
ENOUGH " message is still there.
Matlab told me to increase it and I did. What's wrong?
Did you use optimset?
More importantly, did you pass it
into lsqcurvefit???????? From the
help for lsqcurvefit:
X=LSQCURVEFIT(FUN,X0,XDATA,YDATA,LB,UB,OPTIONS)
minimizes with the default parameters replaced by
values in the structure OPTIONS, an argument created
with the OPTIMSET function. See OPTIMSET for details.
If you did not pass an options
structure into lsqcurvefit, you
could have changed it to inf and
nothing different would have
happened.
By the way, much of the time when
you exceed maxfunevals, it is
indicative of some other problem
with your optimization.
John
Thanks,John,
What do you mean by "it is indicative
of some other problem with your optimization."?
Do you mean that I used the "wrong" model to fit ?
bk
Many times extremely slow convergence suggests
you may have a problem in your model definition,
or in your data itself.
Suppose I tried to estimate the coefficient in
the linear model
y = a - b + c*x
So {a,b,c} are all coefficients in a linear
regression model to be estimated. The thing is
these coefficients are impossible to estimate
uniquely. I can trade off a and b in infinitely
many ways.
A well written linear regression will survive
this problem, depending upon the tool you use,
either one of the coefficients will be set to
zero, or another choice will be made. But a
nonlinear optimization may have more difficulty,
especially if the trade off between parameters
is a more complex relationship. Often the result
may be a slowly convergent solution.
Alternatively, your data may be inadequate to
estimate all of the parameters in your model.
Or poor starting values may have been provided
such that the optimization is diverging to an
unacceptable solution.
So, the problem may not be as simple as the
use of an incorrect model. This will merely
result in unacceptable lack of fit.
HTH,
John
--
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
.
- References:
- How to solve the problem of "MaxFunEvals"?
- From: young
- Re: How to solve the problem of
- From: John D'Errico
- Re: How to solve the problem of
- From: bk
- How to solve the problem of "MaxFunEvals"?
- Prev by Date: sell nike jordan ..and clothing www.nikejordanaaa.com
- Next by Date: Question about structures' field names
- Previous by thread: Re: How to solve the problem of
- Next by thread: rician channel parameters set
- Index(es):
Relevant Pages
|
Loading