mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-30 15:26:23 +02:00
Changes for compatiblity with changes in likelihood
This commit is contained in:
parent
8d98652e8b
commit
bb6f937881
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue