Ripped out all things Laplace parameter estimation, starting again with new tactic

This commit is contained in:
Alan Saul 2013-05-29 14:02:03 +01:00
parent d63d370641
commit 117c377d13
2 changed files with 4 additions and 179 deletions

View file

@ -150,14 +150,8 @@ class GP(model):
fake_dL_dKs = np.eye(self.dL_dK.shape[0]) #FIXME: Check this is right...
dK_dthetaK = self.kern.dK_dtheta(dL_dK=fake_dL_dKs, X=self.X)
#We need the dL_dK where K is equal to the prior K, not K+Sigma as is the case now
dL_dthetaK_implicit = self.likelihood._Kgradients(dL_d_K_Sigma=self.dL_dK, dK_dthetaK=dK_dthetaK)
dL_dthetaK = dL_dthetaK_explicit + dL_dthetaK_implicit
#print "dL_dthetaK_explicit: {dldkx} dL_dthetaK_implicit: {dldki} dL_dthetaK: {dldk}".format(dldkx=dL_dthetaK_explicit, dldki=dL_dthetaK_implicit, dldk=dL_dthetaK)
dL_dthetaK = self.likelihood._Kgradients(dL_d_K_Sigma=self.dL_dK, dK_dthetaK=dK_dthetaK)
dL_dthetaL = self.likelihood._gradients(partial=np.diag(self.dL_dK))
#print "dL_dthetaL: ", dL_dthetaL
print "Stacked dL_dthetaK, dL_dthetaL: ", np.hstack((dL_dthetaK, dL_dthetaL))
else:
dL_dthetaL = self.likelihood._gradients(partial=np.diag(self.dL_dK))