Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org starting in approximately 30 minutes at 22:30 MST on Tuesday 18 February 2020. This is to get a couple of important security updates in place. There will be two short periods of downtime towards the end of the maintenance period.

Public
Authored by Gregory Ashton

Combining likelihoods

An example of how to combine likelihoods

Edited
combining-likelihoods.md 1.36 KB
  • @ethan.payne will try that, I think we can implement this as a feature for N likelihoods in the future

  • @gregory.ashton This worked with a minor change:

    class JointLikelihood(tupak.core.likelihood.Likelihood):
        def __init__(self, likelihoodA, likelihoodB):
            self.likelihoodA = likelihoodA 
            self.likelihoodB = likelihoodB
            self.parameters = self.likelihoodA.parameters
            self.parameters.update(self.likelihoodB.parameters)
    
        def log_likelihood(self):
            self.likelihoodA.parameters.update(self.parameters)
            self.likelihoodB.parameters.update(self.parameters)
            return self.likelihoodA.log_likelihood() + self.likelihoodB.log_likelihood()

    I'll make a merge request!

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment