Fit convergence in ProfileLikelihoodCalculator

Hi,

I’m running a hypothesis test using ProfileLikelihoodCalculator from RooStats, on JupyROOT 6.30/04 from SWAN.

If I don’t fiddle with ROOT::Math::MinimizerOptions (except for print level), I see that the test runs Minuit2 four times, getting status values [3, 5, 3, 5], and finally Minuit(1) with status 4000.
As far as I understand, the 5’s seem to come from “re-scans”, while the 3’s from plain (?) minimization.

If I call

ROOT.Math.MinimizerOptions.SetDefaultMinimizer('Minuit')

before doing anything else, the test only performs one Minuit(1) fit iteration with status 0.

The difference seems to be the EDM criterion for convergence: for Minuit2, I see

convergence for edm < 0

while for Minuit(1)

CONVERGENCE WHEN EDM .LT. 1.00e-03

I’ve noticed that
here,
tolerance is int.
Indeed, it seems I can make Minuit2 converge during the first iteration, only if I call ROOT.Math.MinimizerOptions.SetDefaultTolerance(1.).

Am I missing something, or is this an issue with ROOT?

Thanks,

Fabio

Hi Fabio,

I am adding in the loop our expert, @jonas .

Cheers,
Danilo

Hi,

Just updating the thread with a reproducer for what I was describing:

import ROOT

ROOT.Math.MinimizerOptions.SetDefaultPrintLevel(2)

#ROOT.Math.MinimizerOptions.SetDefaultMinimizer('Minuit')

x = ROOT.RooRealVar('x',
                    'Random variable',
                    -10., +10)
mu = ROOT.RooRealVar('mu',
                     'Mean of gaussian',
                     0., -10., +10.)
sigma = ROOT.RooRealVar('sigma',
                        'Standard deviation of gaussian',
                        1., 0.1, 10.)

pdf = ROOT.RooGaussian('pdf',
                       'Test PDF',
                       x, mu, sigma)

ds = pdf.generate(x, Name='ds', NumEvents=100_000)

hypo = ROOT.RooArgSet(x).snapshot()

mu.setVal(5.) # To start fit with worse parameter estimate

calc = ROOT.RooStats.ProfileLikelihoodCalculator(ds, pdf, (), 0.05, hypo)
calc.GetHypoTest()

On ROOT 6.32.04 (on lxplus), with Minuit2, I see for the global fit:

                Status : MINIMIZE=-1 MINIMIZE=5 MINIMIZE=-1 MINIMIZE=5 MINIMIZE=4000 

If I run the same script with Minuit(1), either on ROOT 6.26/11 as it is, or on 6.32.04 after uncommenting #ROOT.Math.MinimizerOptions.SetDefaultMinimizer('Minuit'), I see instead:

                Status : MINIMIZE=0 

After the first iteration, the edm is actually smaller for Minuit2 (3.74569e-09 vs 7.48973e-09), yet it fails the convergence check due to some stricter cut.

Cheers,
Fabio

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