Warning in <Minuit2>: VariableMetricBuilder Reached machine accuracy limit

Dear community,

I am using Roofit for fitting. I have used Double gaussian for signal and polynomial for background. I have added used RooAddPdf to mode my pdf. I am using fitTo to do the fitting. I am recieving the following warning:

Warning in : VariableMetricBuilder Reached machine accuracy limit; Edm 0.00289339 is smaller than machine limit 0.0355437 while 0.001 was requested

I have run it on different data sets. If the data size is increased the machine limit also increases.

This text will be hidden
I am posting a snipped portion for the details here.
////////////////Signal/////////////////
RooRealVar mean1(“mean1”,“mean of Gaussian-1”,-0.001,-0.1,0.1);
RooRealVar mean2(“mean2”,“mean of Gaussian-2”,0.002,-0.1,0.1);

RooRealVar sigma1(“sigma1”,“sigma of Gaussian-1”,0.0004 ,0.00000001,0.1);
RooRealVar sigma2(“sigma2”,“sigma of Gaussian-2”,0.001 ,0.00000001,0.1);
RooRealVar fsig1(“fsig1”, “signal fraction”, 0.4,0.,1.);

RooGaussian sig1(“sig1”,“Gaussian-1”,deltae,mean1,sigma1);
RooGaussian sig2(“sig2”,“Gaussian-2”,deltae,mean2,sigma2);

RooAddPdf twoGaussians(“twoGaussians”, "sum of two Gaussians ",RooArgList(sig1, sig2), RooArgList(fsig1));
//////////////////////////////////////////

///////////////Background/////////////////
RooRealVar p1(“p1”,“coeff #1”, 0., -100., 100.);
RooRealVar p2(“p2”,“coeff #2”, 0., -10000., 10000.);

RooPolynomial bkg(“bkg”,“bkgd pdf”, deltae, RooArgList(p1,p2));
//////////////////////////////////////////

RooRealVar nsig(“nsig”,“number of sig events”,total_entries - backg ,0.0 ,total_entries);
RooRealVar nbkg(“nbkg”,“number of bkg events”,backg ,0.0 ,total_entries);

RooAddPdf model2("model"," two-Gaussians + background polynomial PDF's",RooArgList(bkg,twoGaussians), RooArgList(nbkg,nsig));

/////////////////////////////////////////////

// In the case of an extended fit, the normalization of the PDF is automatically taken care of by RooFit.
/*
If RooFit::Save() is not mentioned, result will be a nll ptr
*/
// RooFitResult *result = model2.fitTo(*dataIMC, RooFit::Save()); //Extended(kTRUE), Range(-0.1,0.1));

RooFitResult* result = model2.fitTo(*dataIMC,
Extended(kTRUE), // Use extended maximum likelihood fit
RooFit::Save(), // Save the fit result
Strategy(1), // Use the MINUIT2 algorithm with better precision
Minimizer(“Minuit2”, “migrad”), // Use the MIGRAD algorithm for minimization
Range(-0.1, 0.1), // Fit only in the range [-5, 5]
SumW2Error(kTRUE), // Use weighted errors for fitting
Hesse(kTRUE), // Calculate the covariance matrix with HESSE algorithm after minimization
Verbose(kFALSE)); // Do not print debug information during the fit

Welcome to the ROOT Forum!
@jonas can most probably help you with this

Hi,

Try to add the RooFit option, Offset(true) in the model.fitTo function. This should decrease the overall likelihood value and help in this problem caused by numerical precision in the likelihood computation

Cheers

Lorenzo

Dear @moneta ,

Thank you for the suggestion. I could get rid of the warning. I understand the function of RooFit option Offset(true). It will allow a constant shift to the fit function, to account for this systematic shift in the data.

But how does it affect the machine limit?

Neeraj

Hi,

The machine limit that you have (0.03555437 in your case), is computes as epsilon * nll_value, where epsilon is a precision parameter of Minuit2 (it can be changes using SetPrecision) and it is around 1E-8.
If you are using the RooFit OffSet option, the overall nll_value will be smaller and then also your machine limit.

Lorenzo

Dear @moneta,

Thanks for the explanation.

Regards,
Neeraj

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