diff --git a/GPy/likelihoods/gaussian.py b/GPy/likelihoods/gaussian.py index aaa356b6..101aac4b 100644 --- a/GPy/likelihoods/gaussian.py +++ b/GPy/likelihoods/gaussian.py @@ -56,7 +56,7 @@ class Gaussian(Likelihood): def update_gradients(self, grad): self.variance.gradient = grad - def exact_inference_gradients(self, dL_dKdiag): + def exact_inference_gradients(self, dL_dKdiag,Y_metadata=None): return dL_dKdiag.sum() def _preprocess_values(self, Y): @@ -295,7 +295,7 @@ class Gaussian(Likelihood): """ return self.variance - def samples(self, gp): + def samples(self, gp, Y_metadata=None): """ Returns a set of samples of observations based on a given value of the latent variable. @@ -303,6 +303,8 @@ class Gaussian(Likelihood): """ orig_shape = gp.shape gp = gp.flatten() + #orig_shape = gp.shape + gp = gp.flatten() Ysim = np.array([np.random.normal(self.gp_link.transf(gpj), scale=np.sqrt(self.variance), size=1) for gpj in gp]) return Ysim.reshape(orig_shape)