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 #62759 is a reply to message #62623] Wed, 01 October 2008 01:31 Go to previous messageGo to previous message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
On 30 Sep 2008 11:49:46 -0400, Craig Markwardt
<craigmnet@REMOVEcow.physics.wisc.edu> wrote:

> 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.

I'm sorry, but I don't see how it does this. ALPHA is adjusted and
immediatly used (see below). In the next iteration, the increments are
calculated again by mpfit_lmpar and used again to calculate ALPHA,
whether the param was at the limit in the previous iteration or not.

The thing is, my problem is solved when I adjust the increments
themselves and leave ALPHA=1. I was just wondering whether I introduce
some errors by doing this.


INNER_LOOP:
; mpfit_lmpar:
; solve A.wa1=B and sqrt(par).D.wa1=0
; where wa1 is the parameter increment
...
; When some param goes outside boundary, make alpha smaller so it
touches the boundary:

dwa1 = abs(wa1) GT MACHEP0
whl = where(dwa1 AND qllim AND (x + wa1 LT llim), lct)
if lct GT 0 then $
alpha = min([alpha, (llim[whl]-x[whl])/wa1[whl]])
whu = where(dwa1 AND qulim AND (x + wa1 GT ulim), uct)
if uct GT 0 then $
alpha = min([alpha, (ulim[whu]-x[whu])/wa1[whu]])

; Apply increment!
xnew = x + alpha * wa1

; When the step puts us on a boundary, make sure it is exact
...

; Convergence tests + succesfull inner loop test
...
goto INNER_LOOP
[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 08:00:47 PDT 2025

Total time taken to generate the page: 0.96394 seconds