fixed up dK_dX in the exponential and Matern kerns

This commit is contained in:
James Hensman 2013-01-16 11:21:06 +00:00
parent 3f6d334704
commit 688d6ac7a5
3 changed files with 9 additions and 10 deletions

View file

@ -77,7 +77,7 @@ class exponential(kernpart):
#NB: derivative of diagonal elements wrt lengthscale is 0
target[0] += np.sum(partial)
def dK_dX(self,X,X2,target):
def dK_dX(self,partial,X,X2,target):
"""derivative of the covariance matrix with respect to X."""
if X2 is None: X2 = X
dist = np.sqrt(np.sum(np.square((X[:,None,:]-X2[None,:,:])/self.lengthscales),-1))[:,:,None]