Fix the bug in the prediction of full covariance matrix (#702)

* fix the bug in the prediction of full covariance matrix

* Fix the test cases.

* update the version requirement for matplotlib
This commit is contained in:
Zhenwen Dai 2018-10-30 07:43:44 +00:00 committed by GitHub
parent 4f3047e035
commit a86723c8ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View file

@ -238,7 +238,7 @@ class MiscTests(unittest.TestCase):
# Not easy to check if woodbury_inv is correct in itself as it requires a large derivation and expression
Kinv = m.posterior.woodbury_inv
K_hat = k.K(self.X_new) - k.K(self.X_new, Z).dot(Kinv).dot(k.K(Z, self.X_new))
K_hat = np.clip(K_hat, 1e-15, np.inf)
# K_hat = np.clip(K_hat, 1e-15, np.inf)
mu, covar = m.predict_noiseless(self.X_new, full_cov=True)
self.assertEquals(mu.shape, (self.N_new, self.D))