Skip to content

Warn when parameter hits bounds #2525

Open
@lorenzennio

Description

@lorenzennio

Summary

Hey,
I recently ran a lot of toys for a very large model and had a hard time debugging, as some nuisance parameters hit the parameter bounds for some of the toys.
It would be great if a warning could be added in that case. What do you think?

Additional Information

A simple example:

import pyhf

bkg = [5]
sig = [3]

data = bkg

samples = [
    dict(name="signal", data=list(sig), modifiers=[dict(name="mu", type="normfactor", data=None)]),
    dict(name="background", data=list(bkg), modifiers=[]),
]
model = pyhf.Model(dict(channels=[dict(name="singlechannel", samples=samples)]))

init = [5]
bounds =[(3, 10)]
pyhf.infer.mle.fit(data, model, init_pars=init, par_bounds=bounds)

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions