effiiency improvements in sparse_GP

the recasting of derivatives through psi2 into psi1 is now only done in
one place
This commit is contained in:
James Hensman 2013-02-26 15:00:18 +00:00
parent 4d79c3c97d
commit 6e809b024f
2 changed files with 13 additions and 19 deletions

View file

@ -42,11 +42,8 @@ class sparse_GPLVM(sparse_GP_regression, GPLVM):
return sparse_GP_regression.log_likelihood(self)
def dL_dX(self):
#dL_dpsi1 = self.dL_dpsi1 + 2.*np.dot(self.dL_dpsi2,self.psi1)
dL_dpsi1 = self.dL_dpsi1 + 2.*np.dot(self.dL_dpsi2[0,:,:],self.psi1)
dL_dX = self.kern.dKdiag_dX(self.dL_dpsi0,self.X)
dL_dX += self.kern.dK_dX(dL_dpsi1.T,self.X,self.Z)
dL_dX += self.kern.dK_dX(self.dL_dpsi1,self.X,self.Z)
return dL_dX