spey.backends.distributions.ConstraintModel#
- class spey.backends.distributions.ConstraintModel(pdf_descriptions: List[Dict[str, Any]])[source]#
Constraint term modelled as a Gaussian distribution.
- Parameters:
pdf_descriptions (
List[Dict[Text, Any]]
) –description of the pdf component. Dictionary elements should contain two keywords
"distribution_type"
(Text
):"normal"
or"multivariatenormal"
"args"
: Input arguments for the distribution"kwargs"
: Input keyword arguments for the distribution
Methods
__init__
(pdf_descriptions)expected_data
()The expectation value of the constraint model.
log_prob
(pars)Compute log-probability
sample
(pars, sample_size)Generate samples