more fixing of the predictive variance (correct for full_cov now)

This commit is contained in:
James Hensman 2013-03-13 10:37:46 +00:00
parent e9508b40f9
commit 128b2b90ef
3 changed files with 19 additions and 7 deletions

View file

@ -140,7 +140,7 @@ class GP(model):
KiKx = np.dot(self.Ki,Kx)
if full_cov:
Kxx = self.kern.K(_Xnew, slices1=slices,slices2=slices)
var = Kxx - np.dot(KiKx.T,Kx) #NOTE this won't work for plotting
var = Kxx - np.dot(KiKx.T,Kx)
else:
Kxx = self.kern.Kdiag(_Xnew, slices=slices)
var = Kxx - np.sum(np.multiply(KiKx,Kx),0)
@ -179,7 +179,7 @@ class GP(model):
mu, var = self._raw_predict(Xnew, slices, full_cov)
#now push through likelihood TODO
mean, var, _025pm, _975pm = self.likelihood.predictive_values(mu, var)
mean, var, _025pm, _975pm = self.likelihood.predictive_values(mu, var, full_cov)
return mean, var, _025pm, _975pm