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.uncorrelated_background( ... signal=[12.0, 11.0], bkg=[50.0, 52.0], bkg_uncertainty=[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
offloat
) – 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)
forn
model parameters.fixed_params (
tensor
ofbool
) – The flag to set a parameter constant to its starting value during minimization.
- Returns
The Asimov dataset.
- Return type
Tensor