mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-21 14:05:14 +02:00
removed keyname partial
This commit is contained in:
parent
f881e65761
commit
12d6f5056b
17 changed files with 235 additions and 235 deletions
|
|
@ -101,7 +101,7 @@ class periodic_exponential(kernpart):
|
|||
FX = self._cos(self.basis_alpha[None,:],self.basis_omega[None,:],self.basis_phi[None,:])(X)
|
||||
np.add(target,np.diag(mdot(FX,self.Gi,FX.T)),target)
|
||||
|
||||
def dK_dtheta(self,partial,X,X2,target):
|
||||
def dK_dtheta(self,dL_dK,X,X2,target):
|
||||
"""derivative of the covariance matrix with respect to the parameters (shape is NxMxNparam)"""
|
||||
if X2 is None: X2 = X
|
||||
FX = self._cos(self.basis_alpha[None,:],self.basis_omega[None,:],self.basis_phi[None,:])(X)
|
||||
|
|
@ -162,11 +162,11 @@ class periodic_exponential(kernpart):
|
|||
|
||||
dK_dper = mdot(dFX_dper,self.Gi,FX2.T) - mdot(FX,self.Gi,dG_dper,self.Gi,FX2.T) + mdot(FX,self.Gi,dFX2_dper.T)
|
||||
|
||||
target[0] += np.sum(dK_dvar*partial)
|
||||
target[1] += np.sum(dK_dlen*partial)
|
||||
target[2] += np.sum(dK_dper*partial)
|
||||
target[0] += np.sum(dK_dvar*dL_dK)
|
||||
target[1] += np.sum(dK_dlen*dL_dK)
|
||||
target[2] += np.sum(dK_dper*dL_dK)
|
||||
|
||||
def dKdiag_dtheta(self,partial,X,target):
|
||||
def dKdiag_dtheta(self,dL_dKdiag,X,target):
|
||||
"""derivative of the diagonal of the covariance matrix with respect to the parameters"""
|
||||
FX = self._cos(self.basis_alpha[None,:],self.basis_omega[None,:],self.basis_phi[None,:])(X)
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ class periodic_exponential(kernpart):
|
|||
|
||||
dK_dper = 2*mdot(dFX_dper,self.Gi,FX.T) - mdot(FX,self.Gi,dG_dper,self.Gi,FX.T)
|
||||
|
||||
target[0] += np.sum(np.diag(dK_dvar)*partial)
|
||||
target[1] += np.sum(np.diag(dK_dlen)*partial)
|
||||
target[2] += np.sum(np.diag(dK_dper)*partial)
|
||||
|
||||
target[0] += np.sum(np.diag(dK_dvar)*dL_dKdiag)
|
||||
target[1] += np.sum(np.diag(dK_dlen)*dL_dKdiag)
|
||||
target[2] += np.sum(np.diag(dK_dper)*dL_dKdiag)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue