mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-26 05:16:24 +02:00
Fixed bug in dK_dX for the quadratic kernel
This commit is contained in:
parent
f14302e8d0
commit
c3dae7b252
2 changed files with 4 additions and 4 deletions
|
|
@ -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)**
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue