From ad2779bdf3547b13656daed67b66284cb5652614 Mon Sep 17 00:00:00 2001 From: Michael T Smith Date: Thu, 4 Aug 2016 10:11:30 +0100 Subject: [PATCH] made initial lengthscale!=1 to ensure we're properly testing gradients --- GPy/testing/model_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/GPy/testing/model_tests.py b/GPy/testing/model_tests.py index e2c05aec..5d6de7ae 100644 --- a/GPy/testing/model_tests.py +++ b/GPy/testing/model_tests.py @@ -421,6 +421,7 @@ class MiscTests(unittest.TestCase): Y = np.vstack([Y,Y]) m = GPy.models.GPOffsetRegression(X,Y) + m.rbf.lengthscale=5.0 #make it something other than one to check our gradients properly! assert m.checkgrad(), "Gradients of offset parameters don't match numerical approximations." m.optimize() assert np.abs(m.offset[0]-offset)<0.1, ("GPOffsetRegression model failing to estimate correct offset (value estimated = %0.2f instead of %0.2f)" % (m.offset[0], offset))