Re: MPFIT [message #63477 is a reply to message #63341] |
Sat, 08 November 2008 09:36  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Nov 5, 11:17 am, Wox <s...@nomail.com> wrote:
> Hi all
> Hi Craig ;-)
>
> Every once in a while, when usingmpfitwith box constraints on some
> of the parameters, I run into the same problem: I get X+F convergence
> while the model clearly doesn't fit well to the data.
>
> Today it happened again. I noticed that the last alpha (fraction of
> the LM-step) equals to 1.4e-017 which makes the actual and predicted
> reduction of the Chi-Square very small, causing the X and F
> convergence criteria to be fulfilled.
>
> If alpha is so small, this means that a parameter got close to the
> boarder in a previous iteration (in my case 1.1e-016, while the lower
> boarder = 0). When it gets that close, it should have been picked up
> by this piece:
...
>
> But it didn't because llim is zero in my case. Am I right in saying
> that this needs fixing (llim + or - something instead of
> multiplication)?
You're right, this is a bug. I posted my probable fix on my website.
> Additionally, how small can alpha be before causing actred and prered
> to be less than FTOL and causing false convergence? When determining
> alpha, one could then limit it to this smallest value and all steps
> that cause parameters to go outside their box would be put on the
> boarder in the code-snip above.
In principal since both values are scaled by ALPHA, this should not be
an issue.
Craig
See my website,
http://cow.physics.wisc.edu/~craigm/idl/idl.html
listed under "Curve Fitting"
|
|
|