changes to rbf and white to allow new parameter gradient structure

This commit is contained in:
James Hensman 2014-01-24 14:06:16 +00:00
parent ad5a967b39
commit 7b5e8a9ffc
6 changed files with 43 additions and 46 deletions

View file

@ -52,12 +52,8 @@ class Gaussian(Likelihood):
def covariance_matrix(self, Y, Y_metadata=None):
return np.eye(Y.shape[0]) * self.variance
def _gradients(self, partial):
"""
Return the derivative of the log marginal likelihood wrt self.variance,
given the appropriate partial derivative
"""
return np.sum(partial)
def set_gradients(self, partial):
self.variance.gradient = np.sum(partial)
def _preprocess_values(self, Y):
"""