Skip to content

Commit

Permalink
Fix issue #7.
Browse files Browse the repository at this point in the history
  • Loading branch information
F Saad committed Dec 20, 2015
1 parent 7879a5c commit 98d17b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions gpmcc/dists/exponential_uc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ def predictive_logp(self, x):
return ExponentialUC.calc_predictive_logp(x, self.mu)

def marginal_logp(self):
lp = ExponentialUC.calc_log_likelihood(self.N, self.sum_x, self.mu)
return lp
data_logp = ExponentialUC.calc_log_likelihood(self.N, self.sum_x,
self.mu)
prior_logp = ExponentialUC.calc_log_prior(self.mu, self.a, self.b)
return data_logp + prior_logp

def singleton_logp(self, x):
return ExponentialUC.calc_predictive_logp(x, self.mu)
Expand Down
8 changes: 5 additions & 3 deletions gpmcc/dists/normal_uc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ def predictive_logp(self, x):
return NormalUC.calc_predictive_logp(x, self.mu, self.rho)

def marginal_logp(self):
lp = NormalUC.calc_log_likelihood(self.N, self.sum_x, self.sum_x_sq,
self.rho, self.mu)
return lp
data_logp = NormalUC.calc_log_likelihood(self.N, self.sum_x,
self.sum_x_sq, self.rho, self.mu)
prior_logp = NormalUC.calc_log_prior(self.mu, self.rho, self.m,
self.r, self.s, self.nu)
return data_logp + prior_logp

def singleton_logp(self, x):
return NormalUC.calc_predictive_logp(x, self.mu, self.rho)
Expand Down

0 comments on commit 98d17b8

Please sign in to comment.