From a3be00f6193fd19fffa7d37d31e763e19f29c55f Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Thu, 16 May 2013 16:12:26 +0100 Subject: [PATCH] swiss_roll example changes --- GPy/examples/dimensionality_reduction.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPy/examples/dimensionality_reduction.py b/GPy/examples/dimensionality_reduction.py index 2482bcc6..dcda4f42 100644 --- a/GPy/examples/dimensionality_reduction.py +++ b/GPy/examples/dimensionality_reduction.py @@ -68,8 +68,8 @@ def swiss_roll(optimize=True, N=1000, M=15, Q=4, sigma=.2, plot=False): data = swiss_roll_generated(N=N, sigma=sigma) Y = data['Y'] - Y -= Y.mean(0) - Y /= Y.std(0) + Y -= Y.mean() + Y /= Y.std() t = data['t'] c = data['colors'] @@ -102,7 +102,7 @@ def swiss_roll(optimize=True, N=1000, M=15, Q=4, sigma=.2, plot=False): (1 - var))) + .001 Z = np.random.permutation(X)[:M] - kernel = GPy.kern.rbf(Q, ARD=True) + GPy.kern.bias(Q, np.exp(-2)) + GPy.kern.white(Q, 2) + kernel = GPy.kern.rbf(Q, ARD=True) + GPy.kern.bias(Q, np.exp(-2)) + GPy.kern.white(Q, np.exp(-2)) m = Bayesian_GPLVM(Y, Q, X=X, X_variance=S, M=M, Z=Z, kernel=kernel) m.data_colors = c