From 4fd05439fca1d4ddda54ed38d1cc911c1086d90f Mon Sep 17 00:00:00 2001 From: James Hensman Date: Fri, 21 Nov 2014 12:28:04 +0000 Subject: [PATCH] small random perturbations in kernel tests helps with the symmetry gradcheck bug --- GPy/coding_style_guide.txt | 10 ---------- GPy/testing/kernel_tests.py | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 GPy/coding_style_guide.txt diff --git a/GPy/coding_style_guide.txt b/GPy/coding_style_guide.txt deleted file mode 100644 index 0cc732e42..000000000 --- a/GPy/coding_style_guide.txt +++ /dev/null @@ -1,10 +0,0 @@ -In this text document we will describe coding conventions to be used in GPy to keep things consistent. - -All arrays containing data are two dimensional. The first dimension is the number of data, the second dimension is number of features. This keeps things consistent with the idea of a design matrix. - -Input matrices are either X or t, output matrices are Y. - -Input dimensionality is input_dim, output dimensionality is output_dim, number of data is num_data. - -Data sets are preprocessed in the datasets.py file. This file also records where the data set was obtained from in the dictionary stored in the file. Long term we should move this dictionary to sqlite or similar. - diff --git a/GPy/testing/kernel_tests.py b/GPy/testing/kernel_tests.py index df64cb789..c1bb9265e 100644 --- a/GPy/testing/kernel_tests.py +++ b/GPy/testing/kernel_tests.py @@ -18,9 +18,9 @@ class Kern_check_model(GPy.core.Model): """ def __init__(self, kernel=None, dL_dK=None, X=None, X2=None): GPy.core.Model.__init__(self, 'kernel_test_model') - np.random.seed() if kernel==None: kernel = GPy.kern.RBF(1) + kernel.randomize(loc=1, scale=0.1) if X is None: X = np.random.randn(20, kernel.input_dim) if dL_dK is None: