mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-13 22:12:38 +02:00
fixed up dK_dX in the exponential and Matern kerns
This commit is contained in:
parent
3f6d334704
commit
688d6ac7a5
3 changed files with 9 additions and 10 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue