Merge branch 'devel' of github.com:SheffieldML/GPy into devel

This commit is contained in:
James Hensman 2013-11-12 12:06:49 +00:00
commit 42aa2137d3
2 changed files with 4 additions and 3 deletions

View file

@ -173,7 +173,8 @@ class GPBase(Model):
upper = m + 2*np.sqrt(v) upper = m + 2*np.sqrt(v)
Y = self.likelihood.Y Y = self.likelihood.Y
else: else:
m, v, lower, upper = self.predict(Xgrid, which_parts=which_parts) m, v, lower, upper = self.predict(Xgrid, which_parts=which_parts,sampling=False) #Compute the exact mean
m_, v_, lower, upper = self.predict(Xgrid, which_parts=which_parts,sampling=True,num_samples=15000) #Apporximate the percentiles
Y = self.likelihood.data Y = self.likelihood.data
for d in which_data_ycols: for d in which_data_ycols:
gpplot(Xnew, m[:, d], lower[:, d], upper[:, d], axes=ax, edgecol=linecol, fillcol=fillcol) gpplot(Xnew, m[:, d], lower[:, d], upper[:, d], axes=ax, edgecol=linecol, fillcol=fillcol)
@ -210,7 +211,7 @@ class GPBase(Model):
m, _ = self._raw_predict(Xgrid, which_parts=which_parts) m, _ = self._raw_predict(Xgrid, which_parts=which_parts)
Y = self.likelihood.Y Y = self.likelihood.Y
else: else:
m, _, _, _ = self.predict(Xgrid, which_parts=which_parts,num_samples=100) #FIXME we need a balance between accuracy and speed to define num_samples m, _, _, _ = self.predict(Xgrid, which_parts=which_parts,sampling=False)
Y = self.likelihood.data Y = self.likelihood.data
for d in which_data_ycols: for d in which_data_ycols:
m_d = m[:,d].reshape(resolution, resolution).T m_d = m[:,d].reshape(resolution, resolution).T

View file

@ -69,7 +69,7 @@ class Gaussian(likelihood):
self.covariance_matrix = np.eye(self.N) * x self.covariance_matrix = np.eye(self.N) * x
self._variance = x self._variance = x
def predictive_values(self, mu, var, full_cov): def predictive_values(self, mu, var, full_cov, **likelihood_args):
""" """
Un-normalize the prediction and add the likelihood variance, then return the 5%, 95% interval Un-normalize the prediction and add the likelihood variance, then return the 5%, 95% interval
""" """