From e415dcdd93ead5ec9044021c99ec6f60a94f8489 Mon Sep 17 00:00:00 2001 From: Nicolo Fusi Date: Fri, 7 Dec 2012 15:16:52 +0000 Subject: [PATCH] GPLVM accepts an initial value for X (in case you don't want to use the default random/PCA init) --- GPy/models/GPLVM.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GPy/models/GPLVM.py b/GPy/models/GPLVM.py index 8f67fe3f..44147b73 100644 --- a/GPy/models/GPLVM.py +++ b/GPy/models/GPLVM.py @@ -22,8 +22,9 @@ class GPLVM(GP_regression): :type init: 'PCA'|'random' """ - def __init__(self, Y, Q, init='PCA', **kwargs): - X = self.initialise_latent(init, Q, Y) + def __init__(self, Y, Q, init='PCA', X = None, **kwargs): + if X is None: + X = self.initialise_latent(init, Q, Y) GP_regression.__init__(self, X, Y, **kwargs) def initialise_latent(self, init, Q, Y):