[magnification] mostly plotting and some model corrections for _predictive_variable

This commit is contained in:
Max Zwiessele 2015-09-02 15:46:40 +01:00
parent 26bdcfa82e
commit ca60ad3195
7 changed files with 54 additions and 33 deletions

View file

@ -81,18 +81,3 @@ class GPLVM(GP):
resolution, ax, marker, s,
fignum, False, legend,
plot_limits, aspect, updates, **kwargs)
def plot_magnification(self, labels=None, which_indices=None,
resolution=50, ax=None, marker='o', s=40,
fignum=None, legend=True,
plot_limits=None,
aspect='auto', updates=False, **kwargs):
import sys
assert "matplotlib" in sys.modules, "matplotlib package has not been imported."
from ..plotting.matplot_dep import dim_reduction_plots
return dim_reduction_plots.plot_magnification(self, labels, which_indices,
resolution, ax, marker, s,
fignum, False, legend,
plot_limits, aspect, updates, **kwargs)

View file

@ -44,7 +44,7 @@ class SparseGPMiniBatch(SparseGP):
def __init__(self, X, Y, Z, kernel, likelihood, inference_method=None,
name='sparse gp', Y_metadata=None, normalizer=False,
missing_data=False, stochastic=False, batchsize=1):
# pick a sensible inference method
if inference_method is None:
if isinstance(likelihood, likelihoods.Gaussian):
@ -76,6 +76,7 @@ class SparseGPMiniBatch(SparseGP):
logger.info("Adding Z as parameter")
self.link_parameter(self.Z, index=0)
self.posterior = None
self._predictive_variable = self.Z
def has_uncertain_inputs(self):
return isinstance(self.X, VariationalPosterior)