comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » MPfit question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: MPfit question [message #62770 is a reply to message #62623] Tue, 30 September 2008 08:49 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Wox <nomail@hotmail.com> writes:

> Hi all,
>
> I'm using the wonderfull mpfit routine from Craig Markwardt. Today I
> was having problems with convergence and I was looking in the code
> what caused it. I was using parameter limits and as far as I can tell,
> the parameter incrementation is done like this:
>
> xnew = x + alpha * dx
>
> where dx are the parameter increments and alpha = 1, except when xnew
> would exceed the limits, in which case alpha < 1. So if one parameter
> is close to the limit, this effects the increments for all other
> parameters. If alpha is too small, the fit stops.
>
> Why isn't dx adapted, so that pegged parameters won't effect the
> convergence for other parameters?

Hello, thanks for your message.

The original MINPACK fortran code did not have parameter limits, so
limits are my own bolt-on.

If you look at the code, the value of ALPHA is adjusted so that, at
the next iteration, a parameter will exactly touch its boundary,
within a small tolerance. At that point, the parameter will be
considered fixed, and will no longer enter into the calculation of the
value of ALPHA. [*] Thus, the step *is* adaptive, it just doesn't
happen in a single iteration.

If your constraints are pathalogical enough that the fitter is
ping-ponging between two constraints continuously, I don't have much
to say other than to offer my pity. It's not an easy problem to solve.

Craig

[*] - the convergence criteria are also pro-rated because ALPHA is
smaller than 1.


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: cbmarkwardt+usenet@gmail.com
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Trouble writing very large files
Next Topic: Recording batch commands

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:21:32 PDT 2025

Total time taken to generate the page: 0.88254 seconds