From 6534e6606d2b22a9eb874db8251536b4c050f425 Mon Sep 17 00:00:00 2001 From: mzwiessele Date: Thu, 22 May 2014 12:56:02 +0100 Subject: [PATCH] [tests] added some unfix fix print and gradcheck tests, it basically just behaves as a user would do with a model --- GPy/testing/model_tests.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/GPy/testing/model_tests.py b/GPy/testing/model_tests.py index 75c0dadc..7b19538b 100644 --- a/GPy/testing/model_tests.py +++ b/GPy/testing/model_tests.py @@ -126,6 +126,23 @@ class MiscTests(unittest.TestCase): m2.kern[:] = m.kern[''].values() np.testing.assert_equal(m.log_likelihood(), m2.log_likelihood()) + def test_big_model(self): + m = GPy.examples.dimensionality_reduction.mrd_simulation(optimize=0, plot=0, plot_sim=0) + m.X.fix() + print m + m.unfix() + m.checkgrad() + print m + m.fix() + print m + m.inducing_inputs.unfix() + print m + m.checkgrad() + m.unfix() + m.checkgrad() + m.checkgrad() + print m + def test_model_set_params(self): m = GPy.models.GPRegression(self.X, self.Y) lengthscale = np.random.uniform()