mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
fixed seed in pep test script #448
This commit is contained in:
parent
df7c7539f9
commit
323204541e
1 changed files with 2 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ class PEPgradienttest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
######################################
|
######################################
|
||||||
# # 1 dimensional example
|
# # 1 dimensional example
|
||||||
|
np.random.seed(10)
|
||||||
|
|
||||||
N = 20
|
N = 20
|
||||||
# sample inputs and outputs
|
# sample inputs and outputs
|
||||||
|
|
@ -26,6 +27,7 @@ class PEPgradienttest(unittest.TestCase):
|
||||||
# # more datapoints, check in alpha limits, the log marginal likelihood
|
# # more datapoints, check in alpha limits, the log marginal likelihood
|
||||||
# # is consistent with FITC and VFE/Var_DTC
|
# # is consistent with FITC and VFE/Var_DTC
|
||||||
M = 5
|
M = 5
|
||||||
|
np.random.seed(42)
|
||||||
self.X1 = np.c_[np.linspace(-1., 1., N)]
|
self.X1 = np.c_[np.linspace(-1., 1., N)]
|
||||||
self.Y1 = np.sin(self.X1) + np.random.randn(N, 1) * 0.05
|
self.Y1 = np.sin(self.X1) + np.random.randn(N, 1) * 0.05
|
||||||
self.kernel = GPy.kern.RBF(input_dim=1, lengthscale=0.5, variance=1)
|
self.kernel = GPy.kern.RBF(input_dim=1, lengthscale=0.5, variance=1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue