mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
sparseGPLVM demo now working
This commit is contained in:
parent
ba84a43ea3
commit
31b7a0520e
4 changed files with 8 additions and 11 deletions
|
|
@ -42,13 +42,10 @@ class sparse_GPLVM(sparse_GP_regression, GPLVM):
|
|||
return sparse_GP_regression.log_likelihood(self)
|
||||
|
||||
def dL_dX(self):
|
||||
dpsi0_dX = self.kern.dKdiag_dX(self.X)
|
||||
dpsi1_dX = self.kern.dK_dX(self.X,self.Z)
|
||||
dpsi2_dX = self.psi1[:,None,:,None]*dpsi1_dX[None,:,:,:]
|
||||
dL_dpsi1 = self.dL_dpsi1 + 2.*np.dot(self.dL_dpsi2,self.psi1)
|
||||
|
||||
dL_dX = ((self.dL_dpsi0 * dpsi0_dX).sum(0)
|
||||
+ (self.dL_dpsi1[:,:,None]*dpsi1_dX).sum(0)
|
||||
+ 2.0*(self.dL_dpsi2[:, :, None,None] * dpsi2_dX).sum(0).sum(0))
|
||||
dL_dX = self.kern.dKdiag_dX(self.dL_dpsi0,self.X)
|
||||
dL_dX += self.kern.dK_dX(dL_dpsi1.T,self.X,self.Z)
|
||||
|
||||
return dL_dX
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue