pyhf.infer.calculators.generate_asimov_data

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 of float) – The starting values of the model parameters for minimization.

  • par_bounds (tensor) – The extrema of values the model parameters are allowed to reach in the fit. The shape should be (n, 2) for n model parameters.

  • fixed_params (tensor of bool) – The flag to set a parameter constant to its starting value during minimization.

Returns

The Asimov dataset.

Return type

Tensor