From 8fb9ab5610ffd1a90132f6843c4dc6df859be5c2 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 3 May 2013 14:57:03 +0100 Subject: [PATCH] BGPLVM example MATLAB compare --- GPy/examples/dimensionality_reduction.py | 4 ---- GPy/models/Bayesian_GPLVM.py | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/GPy/examples/dimensionality_reduction.py b/GPy/examples/dimensionality_reduction.py index e4fcc234..97601b0f 100644 --- a/GPy/examples/dimensionality_reduction.py +++ b/GPy/examples/dimensionality_reduction.py @@ -192,10 +192,6 @@ def bgplvm_simulation_matlab_compare(): m['noise'] = Y.var() / 100. m['linear_variance'] = .01 -# lscstr = '{}'.format(k.parts[0].name) -# m[lscstr] = .01 -# m.unconstrain(lscstr); m.constrain_fixed(lscstr, 10) - # lscstr = 'X_variance' # m[lscstr] = .01 # m.unconstrain(lscstr); m.constrain_fixed(lscstr, .1) diff --git a/GPy/models/Bayesian_GPLVM.py b/GPy/models/Bayesian_GPLVM.py index 099a17ea..fc7e4ba9 100644 --- a/GPy/models/Bayesian_GPLVM.py +++ b/GPy/models/Bayesian_GPLVM.py @@ -96,9 +96,9 @@ class Bayesian_GPLVM(sparse_GP, GPLVM): print "\rWARNING: Caught LinAlgError, continueing without setting " if self._debug: self._savederrors.append(self.f_call) -# if save_count > 10: -# raise -# self._set_params(self.oldps[-1], save_old=False, save_count=save_count + 1) + if save_count > 10: + raise + self._set_params(self.oldps[-1], save_old=False, save_count=save_count + 1) def dKL_dmuS(self): dKL_dS = (1. - (1. / (self.X_variance))) * 0.5