Fixed bug in dK_dX for the quadratic kernel

This commit is contained in:
Nicolas 2013-03-12 10:43:46 +00:00
parent f14302e8d0
commit c3dae7b252
2 changed files with 4 additions and 4 deletions

View file

@ -136,8 +136,8 @@ Computes the derivative of the likelihood with respect to the inputs ``X`` (a :m
if X2 is None: X2 = X
dist2 = np.square((X-X2.T)/self.lengthscale)
dX = -self.variance*self.power * (X-X2.T)/self.lengthscale**2 * (1 + dist2/2./self.power)**(-self.power-1)
target += np.sum(dL_dK*dX)
dX = -self.variance*self.power * (X-X2.T)/self.lengthscale**2 * (1 + dist2/2./self.lengthscale)**(-self.power-1)
target += np.sum(dL_dK*dX,1)[:,np.newaxis]
**dKdiag_dX(self,dL_dKdiag,X,target)**