small random perturbations in kernel tests helps with the symmetry gradcheck bug

This commit is contained in:
James Hensman 2014-11-21 12:28:04 +00:00
parent d7620594be
commit 4fd05439fc
2 changed files with 1 additions and 11 deletions

View file

@ -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.

View file

@ -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: