mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
GPLVM demo working
This commit is contained in:
parent
4b4f1da128
commit
5f92ff6785
4 changed files with 13 additions and 14 deletions
|
|
@ -46,11 +46,8 @@ class GPLVM(GP_regression):
|
|||
def log_likelihood_gradients(self):
|
||||
dL_dK = self.dL_dK()
|
||||
|
||||
dK_dtheta = self.kern.dK_dtheta(self.X)
|
||||
dL_dtheta = (dK_dtheta*dL_dK[:,:,None]).sum(0).sum(0)
|
||||
|
||||
dK_dX = self.kern.dK_dX(self.X)
|
||||
dL_dX = 2.*np.sum(dL_dK[:,:,None]*dK_dX,0)
|
||||
dL_dtheta = self.kern.dK_dtheta(dL_dK,self.X)
|
||||
dL_dX = 2*self.kern.dK_dX(dL_dK,self.X)
|
||||
|
||||
return np.hstack((dL_dX.flatten(),dL_dtheta))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue