From 94bc40f11519b998d919fbad068790f0973dedf6 Mon Sep 17 00:00:00 2001 From: Teo de Campos Date: Wed, 22 May 2013 15:22:37 +0100 Subject: [PATCH] Minor changes to make the demo run faster --- GPy/examples/dimensionality_reduction.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/GPy/examples/dimensionality_reduction.py b/GPy/examples/dimensionality_reduction.py index 6230ef3a..9c96031c 100644 --- a/GPy/examples/dimensionality_reduction.py +++ b/GPy/examples/dimensionality_reduction.py @@ -305,12 +305,13 @@ def brendan_faces(): from GPy import kern data = GPy.util.datasets.brendan_faces() Q = 2 - # Y = data['Y'][0:-1:2, :] - Y = data['Y'] + Y = data['Y'][0:-1:10, :] + # Y = data['Y'] Yn = Y - Y.mean() Yn /= Yn.std() - m = GPy.models.GPLVM(Yn, Q)#, M=Y.shape[0]/4) + m = GPy.models.GPLVM(Yn, Q) + # m = GPy.models.Bayesian_GPLVM(Yn, Q, M=100) # optimize m.constrain('rbf|noise|white', GPy.core.transformations.logexp_clipped()) @@ -318,7 +319,7 @@ def brendan_faces(): m.ensure_default_constraints() m.optimize('scg', messages=1, max_f_eval=10000) - ax = m.plot_latent() + ax = m.plot_latent(which_indices=(0,1)) y = m.likelihood.Y[0, :] data_show = GPy.util.visualize.image_show(y[None, :], dimensions=(20, 28), transpose=True, invert=False, scale=False) lvm_visualizer = GPy.util.visualize.lvm(m.X[0, :].copy(), m, data_show, ax)