Implement Joint-likelihood in `tupak.core.likelihood`
Implement joint likelihood for N-number of likelihoods. Thanks to @gregory.ashton for the example for 2 likelihoods!
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()