Skip to content

Commit

Permalink
Add null likelihood
Browse files Browse the repository at this point in the history
  • Loading branch information
asb5468 committed Oct 17, 2024
1 parent 573a084 commit 2cccab6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions gwpopulation/hyperpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,3 +495,22 @@ def generate_rate_posterior_sample(self):
this simply returns the current value of the rate parameter.
"""
return self.parameters["rate"]


class NullHyperparameterLikelihood(HyperparameterLikelihood):
"""
A likelihood that can be used to sample the prior space subject to the
maximum_uncertainty constraint imposed on the variance.
For the uncertainty calculation see the Appendix of
`Golomb and Talbot <https://arxiv.org/abs/2106.15745>`_ and
`Farr <https://arxiv.org/abs/1904.10879>`_.
"""

def ln_likelihood_and_variance(self):
"""
Compute the ln likelihood estimator and its variance.
"""
_, variance = super().ln_likelihood_and_variance()
return 0.0, variance

0 comments on commit 2cccab6

Please sign in to comment.