From cf4c5af48764762cf141b901fe4fef7f1b9c00b0 Mon Sep 17 00:00:00 2001 From: beckdaniel Date: Thu, 30 Jul 2015 17:38:21 +0100 Subject: [PATCH] if the plot is a warped gp, then it plots Y before warping --- GPy/plotting/matplot_dep/models_plots.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GPy/plotting/matplot_dep/models_plots.py b/GPy/plotting/matplot_dep/models_plots.py index 9f841372..9ad166b5 100644 --- a/GPy/plotting/matplot_dep/models_plots.py +++ b/GPy/plotting/matplot_dep/models_plots.py @@ -10,6 +10,7 @@ import numpy as np from base_plots import gpplot, x_frame1D, x_frame2D from ...models.gp_coregionalized_regression import GPCoregionalizedRegression from ...models.sparse_gp_coregionalized_regression import SparseGPCoregionalizedRegression +from ...models.warped_gp import WarpedGP from scipy import sparse from ...core.parameterization.variational import VariationalPosterior @@ -73,6 +74,10 @@ def plot_fit(model, plot_limits=None, which_data_rows='all', else: X = model.X Y = model.Y + + if isinstance(model, WarpedGP): + Y = model.Y_untransformed + if sparse.issparse(Y): Y = Y.todense().view(np.ndarray) if hasattr(model, 'Z'): Z = model.Z