pyhs3.distributions.histfactory.modifiers.HasConstraint¶
- class pyhs3.distributions.histfactory.modifiers.HasConstraint[source]¶
Base class for modifiers that can have constraint terms.
- __init__()¶
Methods
__init__()log_constraint(context, sample_data)Create constraint term for this modifier (log space).
make_constraint(context, sample_data)Create constraint term for this modifier (probability space).
Attributes
- abstractmethod HasConstraint.log_constraint(context, sample_data)[source]¶
Create constraint term for this modifier (log space).
Log-space counterpart of
make_constraint(): evaluates the same constraint distribution(s) via their analyticlog_likelihoodinstead of takingpt.logof the probability-space result, so the constraint stays finite where the probability-space value would underflow to 0.0.- Parameters:
context (
Context)sample_data (
SampleData)
- Return type:
TypeAliasType
- abstractmethod HasConstraint.make_constraint(context, sample_data)[source]¶
Create constraint term for this modifier (probability space).
- Parameters:
context (
Context)sample_data (
SampleData)
- Return type:
TypeAliasType