From a7d04387315af55dd1afdccbae60a335a4a0de21 Mon Sep 17 00:00:00 2001 From: Zhenwen Dai Date: Wed, 2 Jul 2014 14:23:56 +0100 Subject: [PATCH] add plot_latent to sparse_gplvm --- GPy/models/sparse_gplvm.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/GPy/models/sparse_gplvm.py b/GPy/models/sparse_gplvm.py index b1b3c2db..4642e158 100644 --- a/GPy/models/sparse_gplvm.py +++ b/GPy/models/sparse_gplvm.py @@ -32,3 +32,16 @@ class SparseGPLVM(SparseGPRegression): def parameters_changed(self): super(SparseGPLVM, self).parameters_changed() self.X.gradient = self.kern.gradients_X(self.grad_dict['dL_dKnm'], self.X, self.Z) + + def plot_latent(self, labels=None, which_indices=None, + resolution=50, ax=None, marker='o', s=40, + fignum=None, plot_inducing=True, legend=True, + plot_limits=None, + aspect='auto', updates=False, predict_kwargs={}, imshow_kwargs={}): + assert "matplotlib" in sys.modules, "matplotlib package has not been imported." + from ..plotting.matplot_dep import dim_reduction_plots + + return dim_reduction_plots.plot_latent(self, labels, which_indices, + resolution, ax, marker, s, + fignum, plot_inducing, legend, + plot_limits, aspect, updates, predict_kwargs, imshow_kwargs)