Re: large number of fit parameters

Tomasz Motylewski (motyl@stan.chemie.unibas.ch)
Thu, 03 Sep 1998 17:00:40 +0200 (MET DST)


On Thu, 3 Sep 1998, Rene Brun wrote:

> > some parameters in TGraph::Fit ? I have quite good starting values for them.
> > Before I run TGraph::Fit, I may not use gMinuit->mnfixp and then
> > gMinuit->mnfree (or may I?). After I run TGraph::Fit all my parameters are
> > changed.
>
> Did you try the "B" option (Bound parameters). With this option,
> you must specify the limits for your parameters. To freeze one
> parameter, simply set the lower limit= the upper limit.

Yes, I use them on all parameters. But when I try to set
lower_lim=upper_lim=value I get (root 2.00/10, RH4.2):

PARAMETER DEFINITIONS:
NO. NAME VALUE STEP SIZE LIMITS
1 'Int_38 ' 4.75885e+00 1.42766e+00 1.42766e+00 7.13828e+00
2 'Pos_38 ' 1.90349e+04 5.71046e+03 1.90349e+04 1.90349e+04
USER ERROR IN MINUIT PARAMETER
DEFINITION
UPPER AND LOWER LIMITS EQUAL.
3 'Wid_38 ' 4.26878e-02 1.28063e-02 4.26878e-02 4.26878e-02
USER ERROR IN MINUIT PARAMETER
DEFINITION
UPPER AND LOWER LIMITS EQUAL.
etc. and then:

**********
** 2 **SET PRINT 2
**********
**********
** 3 **MIGRAD 5000 0.01
**********
FIRST CALL TO USER FUNCTION AT NEW START POINT, WITH IFLAG=4.
START MIGRAD MINIMIZATION. STRATEGY 1. CONVERGENCE WHEN EDM .LT. 1.00e-05
FCN=-NaN FROM MIGRAD STATUS=INITIATE 3385 CALLS 3386 TOTAL
EDM= unknown STRATEGY= 1 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 Int_38 4.75885e+00 1.42766e+00 0.00000e+00 -NaN
4 Int_39 4.83280e+00 1.44984e+00 0.00000e+00 -NaN
7 Int_40 5.21779e+00 1.56534e+00 0.00000e+00 -NaN
10 Int_41 5.49850e+00 1.64955e+00 0.00000e+00 -NaN
13 Int_42 5.75033e+00 1.72510e+00 0.00000e+00 -NaN
16 Int_43 5.99893e+00 1.79968e+00 0.00000e+00 -NaN
NO ERROR MATRIX
FCN=-NaN FROM MIGRAD STATUS=PROGRESS 3504 CALLS 3505 TOTAL
EDM=-NaN STRATEGY= 1 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 Int_38 -NaN 1.42766e+00 -NaN -NaN
4 Int_39 -NaN 1.44984e+00 -NaN -NaN
7 Int_40 -NaN 1.56534e+00 -NaN -NaN
10 Int_41 -NaN 1.64955e+00 -NaN -NaN
13 Int_42 -NaN 1.72510e+00 -NaN -NaN
16 Int_43 -NaN 1.79968e+00 -NaN -NaN
FCN=-NaN FROM MIGRAD STATUS=PROGRESS 4694 CALLS 4695 TOTAL
EDM=NaN STRATEGY= 1 NO ERROR MATRIX
etc. Setting the limits very close is also not satisfactory - Minuit will
still try to optimize them, and 30 parameter optimisation is much slower than
10.

I have put all files and programs I have used here to
http://crds.chemie.unibas.ch/~exp/GaussFit/GaussFit.tgz

>
> This option could be added, but I do not understand what you want
> to do with TGraph::Fit in this case.

I would like to run my own fit sequence, e.g. first Monte Carlo, then Migrad,
then other methods. But I do not want to copy the whole TGraph::Fit into my
macro (interpreted version could be slower also). Also eps and other
parameters may be tuned then. I have to fit 125 gauss functions, I have good
guesses, I am doing it 10 functions at a time, and first magnitudes, then
positions and widths should be fitted.

Best regards,

--
Tomasz Motylewski