reverted stupid merge error

This commit is contained in:
Max Zwiessele 2013-07-18 15:15:09 +01:00
parent a27557e196
commit dcec9d2a25
8 changed files with 41 additions and 17 deletions

View file

@ -115,8 +115,8 @@ class BayesianGPLVM(SparseGP, GPLVM):
self.dbound_dZtheta = SparseGP._log_likelihood_gradients(self)
return np.hstack((self.dbound_dmuS.flatten(), self.dbound_dZtheta))
def plot_latent(self, *args, **kwargs):
return plot_latent.plot_latent(self, *args, **kwargs)
def plot_latent(self, plot_inducing=True, *args, **kwargs):
return plot_latent.plot_latent(self, plot_inducing=plot_inducing, *args, **kwargs)
def do_test_latents(self, Y):
"""

View file

@ -36,10 +36,10 @@ class GPLVM(GP):
self.ensure_default_constraints()
def initialise_latent(self, init, input_dim, Y):
Xr = np.random.randn(Y.shape[0], input_dim)
if init == 'PCA':
return PCA(Y, input_dim)[0]
else:
return np.random.randn(Y.shape[0], input_dim)
Xr[:, :Y.shape[1]] = PCA(Y, input_dim)[0]
return Xr
def getstate(self):
return GP.getstate(self)