From a3f0570e00918e692b1cdfb70ae2a779aee77603 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:41:39 +0100 Subject: [PATCH] Update rv_transformation_tests.py --- GPy/testing/rv_transformation_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPy/testing/rv_transformation_tests.py b/GPy/testing/rv_transformation_tests.py index cfc4c49b..18dccd36 100644 --- a/GPy/testing/rv_transformation_tests.py +++ b/GPy/testing/rv_transformation_tests.py @@ -34,7 +34,7 @@ class RVTransformationTestCase(unittest.TestCase): # The PDF of the transformed variables p_phi = lambda phi : np.exp(-m._objective_grads(phi)[0]) # To the empirical PDF of: - theta_s = prior.rvs(5) + theta_s = prior.rvs(1e6) phi_s = trans.finv(theta_s) # which is essentially a kernel density estimation kde = st.gaussian_kde(phi_s) @@ -56,7 +56,7 @@ class RVTransformationTestCase(unittest.TestCase): # The following test cannot be very accurate self.assertTrue(np.linalg.norm(pdf_phi - kde(phi)) / np.linalg.norm(kde(phi)) <= 1e-1) # Check the gradients at a few random points - for i in range(len(theta_s)): + for i in range(5): m.theta = theta_s[i] self.assertTrue(m.checkgrad(verbose=True))