mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
Plotting problematic kernel
This commit is contained in:
parent
267a8e427c
commit
9de0b23f65
1 changed files with 8 additions and 3 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue