Re: dependence of fit with previous one

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Tue, 1 Mar 2011 15:00:33 +0100


thanks Lorenzo

indeed, the difference are much smaller that the stat errors

and indeed, the function is a complex one : a Crystal-Ball+gaussian

ok, everything sounds fine



Lorenzo Moneta a écrit :
> On Mar 1, 2011, at 2:26 PM, Marc Escalier wrote:
>
>
>> sorry,
>> i'm not sure to understand
>>
>> i call exactly the same function for the two fits and i reinitialize the parameters and their errors
>> only the histogram is not the same
>>
>
> I don't understand, if the histogram is different, the likelihood function will be different....
>
>> but i see that the digits are not exactly the same
>> -->
>> how to fix the "numerical error in the function evaluation" ?
>>
>> i mean the result is not reproducible if one does a previous fit : it sounds problematic, isn't it ?
>>
>
> It is not a problem as long as the numerical error is much smaller that your statistical errors.
> For example you can get a different likelihood value if you are using a different order in summing the contributions,
> although the contributions are all the same.
>
>>> It could be also you are using a MC integration in the function evaluation. In this case this can happen.
>>>
>> sorry : what is a Monte-Carlo Integration ?
>>
>
> See http://en.wikipedia.org/wiki/Monte_Carlo_integration
> In this case, since random number are used the result of the integral will be different if you are using different random seeds.
>
>
>> (i just used : myhisto->Fit("LV");
>>
>
> Fine, but what is your function ?? It could be a very complicated object doing integrals or whatever....
>
>
> Lorenzo
>
>> thank for any help
>>
>> =======
>>
>> Lorenzo Moneta a écrit :
>>
>>> Hi Marc,
>>>
>>> The fit is re-initialized correctly when you set the parameters and the errors. In your case, it is probably your function which returns a different result given the same parameters probably due to a numerical error in the function evaluation.
>>> I can see that you have a numerical problem in evaluating your function to minimize by seeing this error message in the log file: MIGRAD FAILS TO FIND IMPROVEMENT
>>> MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.
>>>
>>> It could be also you are using a MC integration in the function evaluation. In this case this can happen.
>>>
>>> Cheers,
>>> Lorenzo
>>> On Mar 1, 2011, at 1:08 PM, Marc Escalier wrote:
>>>
>>>
>>>> Hello,
>>>>
>>>> i observed a dependence of a given fit the previous one, *even* when i reinitialize each of the parameters and their errors
>>>>
>>>> -->is there a way to "reinitialize" the fitter to have reproducibility one one do some previous (or not) fits ?
>>>>
>>>> thanks a lot
>>>>
>>>> -->here is a log of the fits
>>>> http://users.lal.in2p3.fr/escalier/ProblemRoot/
>>>>
>>>> it begins to change here :
>>>> with only one fit :
>>>> 2 CB_mean 1.40000e+02 6.00000e-01 2.01358e-01 2.51098e+02
>>>>
>>>> with *a* previous fit before (and after having reiniatzed the parameter by SetParameter and SetParError) :
>>>> 2 CB_mean 1.40000e+02 6.00000e-01 2.01358e-01 2.51095e+02
>>>>
>>>> at the end of the fit : it gives
>>>> with only one fit :
>>>>
>>>> 1 A 6.19000e+02 fixed 2 CB_mean 1.39795e+02 3.64629e-02 3 CB_sigma 1.95380e+00 3.00964e-02 4 CB_alpha 1.22909e+00 4.12433e-02 5 CB_n 1.00000e+01 fixed 6 Gauss_mean 1.44687e+02 7.63561e-01 7 Gauss_sigma 2.57589e+00 4.29212e-01 8 frac_CB 9.75035e-01 5.66139e-03
>>>> with *a* previous fit before (and after having reiniatzed the parameter by SetParameter and SetParError) :
>>>>
>>>> 1 A 6.19000e+02 fixed 2 CB_mean 1.39795e+02 3.72340e-02 3 CB_sigma 1.95381e+00 3.07984e-02 4 CB_alpha 1.22910e+00 4.12501e-02 5 CB_n 1.00000e+01 fixed 6 Gauss_mean 1.44688e+02 7.55733e-01 7 Gauss_sigma 2.57555e+00 4.30838e-01 8 frac_CB 9.75039e-01 5.48416e-03
>>>> -->some digits are not exactly the same
>>>>
>>>> thanks
>>>>
>>>>
>
>
Received on Tue Mar 01 2011 - 15:02:41 CET

This archive was generated by hypermail 2.2.0 : Tue Mar 01 2011 - 17:50:01 CET