fixed the posterior prediction for laplace

The mis-match between the woodbury vector and KIf is still a bit of a
mystery
This commit is contained in:
James Hensman 2014-03-13 16:03:19 +00:00
parent b7508ce12b
commit f0d97f5b84
2 changed files with 5 additions and 3 deletions

View file

@ -53,11 +53,13 @@ class Laplace(object):
f_hat, Ki_fhat = self.rasm_mode(K, Y, likelihood, Ki_f_init, Y_metadata=Y_metadata)
self.f_hat = f_hat
self.Ki_fhat = Ki_fhat
self.K = K.copy()
#Compute hessian and other variables at mode
log_marginal, woodbury_vector, woodbury_inv, dL_dK, dL_dthetaL = self.mode_computations(f_hat, Ki_fhat, K, Y, likelihood, kern, Y_metadata)
self._previous_Ki_fhat = Ki_fhat.copy()
return Posterior(woodbury_vector=woodbury_vector, woodbury_inv=woodbury_inv, K=K), log_marginal, {'dL_dK':dL_dK, 'dL_dthetaL':dL_dthetaL}
return Posterior(woodbury_vector=Ki_fhat, woodbury_inv=woodbury_inv, K=K), log_marginal, {'dL_dK':dL_dK, 'dL_dthetaL':dL_dthetaL}
def rasm_mode(self, K, Y, likelihood, Ki_f_init, Y_metadata=None):
"""

View file

@ -27,9 +27,9 @@ class StudentT(Likelihood):
super(StudentT, self).__init__(gp_link, name='Student_T')
self.sigma2 = Param('t_noise', float(sigma2))
self.sigma2 = Param('t_noise', float(sigma2), Logexp())
self.v = Param('deg_free', float(deg_free))
self.add_parameter(self.sigma2, Logexp())
self.add_parameter(self.sigma2)
self.add_parameter(self.v)
self.v.constrain_fixed()