Missing normalisation parameter in unbinned extended ML fits with ROOT::Fit::Fitter class

When performing an extended LL fit the extended fit parameter does not appear as additional parameter in the fit result. I would expect this to be the case for a proper extended ML fit?

Here’s the code snippet, set up following what suggested in https://root.cern.ch/root/htmldoc/guides/users-guide/FittingHistograms.html

//----------------------------------------------------------------------------
ROOT::Math::MinimizerOptions myMinimizerOptions;
ROOT::Fit::Fitter myFitter;

ROOT::Math::WrappedMultiTF1 myFitFunction(*FitFunction, FitFunction->GetNdim() );
myFitter.SetFunction(myFitFunction,false);

ROOT::Fit::FitConfig myFitConfig=myFitter.Config();
myMinimizerOptions.SetPrintLevel(4);
myFitConfig.SetMinimizerOptions(myMinimizerOptions);

printf(“Now going for the actual fit call…\n”);
myFitter.Fit(*UnBinnedData,true);
myFitter.GetMinimizer()->PrintResults();
//----------------------------------------------------------------------------

Where FitFunction is a unit-normalized exponential parameterised as a function of the exponential slope a in e^a*x

The result of the parameters printout:

FCN=22743.4 FROM MIGRAD STATUS=CONVERGED 14 CALLS 15 TOTAL
EDM=1.616e-11 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 ExponentialConstant 9.99163e-04 1.41049e-04 1.46889e-05 2.85005e-02
ERR DEF= 0.5

is this the intended behaviour? Is the fitter misconfigured in the above example?

thank you!
Alex


ROOT Version: 6.14/06
Platform: Mac OS 10.14.4
Compiler: Not Provided


Hi,

The normalisation parameter is not added automatically. In your case you would need to add it yourself and fit a function multiplied by a normalisation parameter (e.g. the number of events).
In your case for example you should define the fit function as B*e^(A*x) or e^(A*x + B) where A,B are the fit parameters.

Cheers

Lorenzo

Ciao Lorenzo,
thank you for your reply. This clarifies a bit, however there’s something that still leaves me confused: since the fit is unbinned, I would expect a poisson term to be added to the likelihood as a function of the same normalisation parameter. Is this done automatically by the fitter? I imagine that in order for that to happen we would need to:

  • flag this parameter in some special way for the fitter to identify what to build the poisson term around
  • insure that the PDF is normalised properly so that this parameter represents exactly the number of events, otherwise the poisson term may end up improperly parameterised

Is this documented somewhere?

cheers,
Alex

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.