pyhf.simplemodels.uncorrelated_background#
- pyhf.simplemodels.uncorrelated_background(signal, bkg, bkg_uncertainty, batch_size=None, validate=True, poi_name='mu')[source]#
Construct a simple single channel
Model
with ashapesys
modifier representing an uncorrelated background uncertainty.Example
>>> import pyhf >>> pyhf.set_backend("numpy") >>> model = pyhf.simplemodels.uncorrelated_background( ... signal=[12.0, 11.0], bkg=[50.0, 52.0], bkg_uncertainty=[3.0, 7.0] ... ) >>> model.schema 'model.json' >>> model.config.channels ['singlechannel'] >>> model.config.samples ['background', 'signal'] >>> model.config.parameters ['mu', 'uncorr_bkguncrt'] >>> model.expected_data(model.config.suggested_init()) array([ 62. , 63. , 277.77777778, 55.18367347])
- Parameters:
signal (
list
) – The data in the signal samplebkg (
list
) – The data in the background samplebkg_uncertainty (
list
) – The statistical uncertainty on the background sample countsbatch_size (
None
orint
) – Number of simultaneous (batched) Models to computevalidate (
bool
) – IfTrue
, validate the model before returning. Only set this toFalse
if you have an experimental use case and know what you’re doing.poi_name (
str
) – TheModel
parameter of interest name. Defaults to"mu"
.
- Returns:
The statistical model adhering to the
model.json
schema- Return type:
Changed in version 0.8.0: Added
poi_name
argument.