generate_asimov_data

class pyhf.infer.calculators.generate_asimov_data(asimov_mu, data, pdf, init_pars, par_bounds, fixed_params)[source]

Compute Asimov Dataset (expected yields at best-fit values) for a given POI value.

Example

>>> import pyhf
>>> pyhf.set_backend("numpy")
>>> model = pyhf.simplemodels.hepdata_like(
...     signal_data=[12.0, 11.0], bkg_data=[50.0, 52.0], bkg_uncerts=[3.0, 7.0]
... )
>>> observations = [51, 48]
>>> data = observations + model.config.auxdata
>>> mu_test = 1.0
>>> pyhf.infer.calculators.generate_asimov_data(mu_test, data, model, None, None, None)
array([ 60.61229858,  56.52802479, 270.06832542,  48.31545488])
Parameters
  • asimov_mu (float) – The value for the parameter of interest to be used.

  • data (tensor) – The observed data.

  • pdf (Model) – The statistical model adhering to the schema model.json.

  • init_pars (tensor) – The initial parameter values to be used for fitting.

  • par_bounds (tensor) – The parameter value bounds to be used for fitting.

  • fixed_params (tensor) – Parameters to be held constant in the fit.

Returns

The Asimov dataset.

Return type

Tensor