_ConstraintModel#

class pyhf.pdf._ConstraintModel(config, batch_size)[source]#

Bases: object

Factory class to create pdfs for the constraint terms.

__init__(config, batch_size)[source]#

Methods

has_pdf()[source]#

Indicate whether this model has a constraint.

Returns:

Whether the model has a constraint term

Return type:

Bool

logpdf(auxdata, pars)[source]#

Compute the logarithm of the value of the probability density.

Parameters:
  • auxdata (tensor) – The auxiliary data (a subset of the full data in a HistFactory model)

  • pars (tensor) – The model parameters

Returns:

The log of the pdf value

Return type:

Tensor

make_pdf(pars)[source]#

Construct a pdf object for a given set of parameter values.

Parameters:

pars (tensor) – The model parameters

Returns:

A distribution object implementing the constraint pdf of HistFactory.

Either a Poissonn, a Gaussian or a joint pdf of both depending on the constraints used in the specification.

Return type:

pdf