Re: Stupid fitting bug/feature?

From: Arthur E. Snyder <snyder_at_slac.stanford.edu>
Date: Fri, 13 May 2005 11:30:39 -0700 (PDT)


Ok .. I found the "B" option .. still seems like a wrong headed default behavior for fixed parameters .. but at least it's not hard to avoid once you find your way through the OO jungle to the find the option ..

-Art S.

A.E. Snyder, Group EC                        \!c*p?/
SLAC Mail Stop #95                          ((.   .))
Box 4349                                        |
Stanford, Ca, USA, 94309                      '\|/`
e-mail:snyder_at_slac.stanford.edu                 o
phone:650-926-2701                              _
http://www.slac.stanford.edu/~snyder          BaBar
FAX:650-926-2657                          Collaboration



On Fri, 13 May 2005, Arthur E. Snyder wrote:

>
> When fitting a histogram with a simple function such as "pol0" root has a
> "stupid" behavior. If you fix a parameter, it still moves the parameter
> when attempting to make an initial guess. This is not a very intuitive
> behavior.
>
> E.g., in attempting to extract the chisq with constant value 1 from a
> ratio plot I do the following:
>
> f=fetchFit("pol0") <----- just does GetObject stuff
> f->FixParameter(0,1.0)
> f->Print()
>
> pol0 : pol0 Ndim= 1, Npar= 1, Noper= 1
> fExpr[0] = pol0 action = 130 action param = 1
> Par 0 p0 = 1
>
> --->so it worked to set the parameter
>
> ..root [83] f->GetParError(0)
> (const Double_t)0.00000000000000000e+00
>
>
> ----> and it worked to fix the error
>
> ...but when I fit with
>
> rat->Fit(f)
>
> it gives this:
>
> , EXT PARAMETER CURRENT GUESS STEP FIRST
> NO. NAME VALUE ERROR SIZE DERIVATIVE
> 1 p0 2.11704e-01 fixed
>
> ---which not sensensible (and incidently not a very good guess, since
> 'rat' is in fact consistent with 1.0).
>
> This is coming from the code where root fitting tries to guess the initial
> starting point of the fit. Was this intentional? Off hand I can't see a
> use case where this is the behavior one would want. It'd make more sense
> to disable guessing for fixed parameters.
>
> I seem to recall some flag that can turn off initial guessing, but I think
> it should be automatically turned off when a parameter is fixed.
>
> -Art S.
>
>
> A.E. Snyder, Group EC \!c*p?/
> SLAC Mail Stop #95 ((. .))
> Box 4349 |
> Stanford, Ca, USA, 94309 '\|/`
> e-mail:snyder_at_slac.stanford.edu o
> phone:650-926-2701 _
> http://www.slac.stanford.edu/~snyder BaBar
> FAX:650-926-2657 Collaboration
>
>
>
>
Received on Fri May 13 2005 - 20:30:47 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:08 MET