pspec_likelihood.likelihood.PSpecLikelihood#
- class pspec_likelihood.likelihood.PSpecLikelihood(*, model: DataModelInterface, set_negative_to_zero=False)[source]#
Base class for likelihoods.
The base class implements one abstract method:
loglike()
, which must compute the floating-point log-likelihood given the theory and systematics parameters that are being sampled/varied.- Parameters:
model (pspec_likelihood.likelihood.DataModelInterface) – An instance of
DataModelInterface
that is used to do the transformation from theory to data space.set_negative_to_zero (bool) – Whether to treat negative power spectrum values as zero.
Methods
__init__
(*, model[, set_negative_to_zero])Method generated by attrs for class PSpecLikelihood.
loglike
(theory_params, sys_params)Compute the log-likelihood.
validate
()Validation of a particular likelihood.
Attributes
A mask where data is properly defined and usable.
Return power_spectrum respecting set_negative_to_zero.
Compute the variance of the likelihood.