Plotting problematic kernel

This commit is contained in:
Alan Saul 2013-04-29 18:08:46 +01:00
parent 267a8e427c
commit 9de0b23f65

View file

@ -92,9 +92,12 @@ class Laplace(likelihood):
""" """
dL_dytil, dytil_dfhat = self._shared_gradients_components() dL_dytil, dytil_dfhat = self._shared_gradients_components()
A = np.eye(self.N) + np.dot(self.K, self.W) print "Computing K gradients"
plt.imshow(A) I = np.eye(self.N)
plt.show() C = np.dot(self.K, self.W)
A = I + C
#plt.imshow(A)
#plt.show()
I_KW_i, _, _, _ = pdinv(A) I_KW_i, _, _, _ = pdinv(A)
#FIXME: Careful dK_dthetaK is not the derivative with respect to the marginal just prior K! #FIXME: Careful dK_dthetaK is not the derivative with respect to the marginal just prior K!
@ -250,6 +253,8 @@ class Laplace(likelihood):
:K: Covariance matrix :K: Covariance matrix
""" """
self.K = K.copy() self.K = K.copy()
#assert np.all(self.K.T == self.K)
#self.K_safe = K.copy()
if self.rasm: if self.rasm:
self.f_hat = self.rasm_mode(K) self.f_hat = self.rasm_mode(K)
else: else: