Skip to content

default minuit settings fail on pretty simple model #1591

@lukasheinrich

Description

@lukasheinrich

Summary

Fairly easy histosys + normfactor model, but our minuit settings aren't great.. any tips @alexander-held ? (I saw it first in cabinetry but realized it's the minuit backend)

def make_model(s,b,bup,bdn):
    m = {
        'channels': [{'name': 'singlechannel',
        'samples': [{'name': 'signal',
            'data': [s],
            'modifiers': [{'name': 'mu', 'type': 'normfactor', 'data': None}]},
            {'name': 'background',
            'data': [b],
            'modifiers': [
                {'name': 'bkguncrt',
            'type': 'histosys',
            'data': {'hi_data': [bup], 'lo_data': [bdn]}
            }]}]}]
        }
    return pyhf.Model(m)

m = make_model(7,50,40,60)
d = [50] + m.config.auxdata
pyhf.set_backend('jax',pyhf.optimize.minuit_optimizer())
print(pyhf.infer.mle.fit(d,m))
pyhf.set_backend('jax',pyhf.optimize.scipy_optimizer())
print(pyhf.infer.mle.fit(d,m))
[0.74700387 0.38452911]
[3.07345898e-19 6.20569308e-06]

OS / Environment

n/a

Steps to Reproduce

see above

File Upload (optional)

No response

Expected Results

this should work trivially :-/

Actual Results

not working :)

pyhf Version

0.6.1

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions