Model¶
- class pyhf.pdf.Model(spec, batch_size=None, **config_kwargs)[source]¶
Bases:
object
The main pyhf model class.
Attributes
- nominal_rates¶
Nominal value of bin rates of the main model.
Methods
- constraint_logpdf(auxdata, pars)[source]¶
Compute the log value of the constraint pdf.
- Parameters
auxdata (
tensor
) – The auxiliary measurement datapars (
tensor
) – The parameter values
- Returns
The log density value
- Return type
Tensor
- expected_actualdata(pars)[source]¶
Compute the expected value of the main model.
- Parameters
pars (
tensor
) – The parameter values- Returns
The expected data of the main model (no auxiliary data)
- Return type
Tensor
- expected_auxdata(pars)[source]¶
Compute the expected value of the auxiliary measurements.
- Parameters
pars (
tensor
) – The parameter values- Returns
The expected data of the auxiliary pdf
- Return type
Tensor
- expected_data(pars, include_auxdata=True)[source]¶
Compute the expected value of the main model
- Parameters
pars (
tensor
) – The parameter values- Returns
The expected data of the main and auxiliary model
- Return type
Tensor
- logpdf(pars, data)[source]¶
Compute the log value of the full density.
- Parameters
pars (
tensor
) – The parameter valuesdata (
tensor
) – The measurement data
- Returns
The log density value
- Return type
Tensor
- mainlogpdf(maindata, pars)[source]¶
Compute the log value of the main term.
- Parameters
maindata (
tensor
) – The main measurement datapars (
tensor
) – The parameter values
- Returns
The log density value
- Return type
Tensor