diff --git a/GPy/plotting/gpy_plot/data_plots.py b/GPy/plotting/gpy_plot/data_plots.py index a24a67ab..5e6373e5 100644 --- a/GPy/plotting/gpy_plot/data_plots.py +++ b/GPy/plotting/gpy_plot/data_plots.py @@ -175,7 +175,7 @@ def _plot_inducing(self, canvas, visible_dims, projection, label, **plot_kwargs) visible_dims = [i for i in sig_dims if i is not None] free_dims = get_free_dims(self, visible_dims, None) - Z = self.Z[:, free_dims] + Z = self.Z.values plots = {} #one dimensional plotting diff --git a/GPy/plotting/gpy_plot/latent_plots.py b/GPy/plotting/gpy_plot/latent_plots.py index 49e93382..f76fda1c 100644 --- a/GPy/plotting/gpy_plot/latent_plots.py +++ b/GPy/plotting/gpy_plot/latent_plots.py @@ -113,19 +113,18 @@ def plot_latent_inducing(self, legend=False, plot_limits=None, marker=None, - num_samples=1000, projection='2d', **kwargs): """ Plot a scatter plot of the inducing inputs. - :param array-like labels: a label for each data point (row) of the inputs - :param (int, int) which_indices: which input dimensions to plot against each other + :param [int] which_indices: which input dimensions to plot against each other :param bool legend: whether to plot the legend on the figure :param plot_limits: the plot limits for the plot :type plot_limits: (xmin, xmax, ymin, ymax) or ((xmin, xmax), (ymin, ymax)) :param str marker: marker to use [default is custom arrow like] :param kwargs: the kwargs for the scatter plots + :param str projection: for now 2d or 3d projection (other projections can be implemented, see developer documentation) """ canvas, projection, kwargs, sig_dims = _new_canvas(self, projection, kwargs, which_indices) @@ -135,7 +134,7 @@ def plot_latent_inducing(self, kwargs['marker'] = marker update_not_existing_kwargs(kwargs, pl().defaults.inducing_2d) # @UndefinedVariable from .data_plots import _plot_inducing - scatters = _plot_inducing(self, canvas, sig_dims[:2], projection, label, num_samples=num_samples, **kwargs) + scatters = _plot_inducing(self, canvas, sig_dims[:2], projection, label, **kwargs) return pl().add_to_canvas(canvas, dict(scatter=scatters), legend=legend) diff --git a/GPy/testing/baseline/bayesian_gplvm_gradient.npz b/GPy/testing/baseline/bayesian_gplvm_gradient.npz new file mode 100644 index 00000000..f3b56c49 Binary files /dev/null and b/GPy/testing/baseline/bayesian_gplvm_gradient.npz differ diff --git a/GPy/testing/baseline/bayesian_gplvm_inducing.npz b/GPy/testing/baseline/bayesian_gplvm_inducing.npz new file mode 100644 index 00000000..2ad1866a Binary files /dev/null and b/GPy/testing/baseline/bayesian_gplvm_inducing.npz differ diff --git a/GPy/testing/baseline/bayesian_gplvm_inducing_3d.npz b/GPy/testing/baseline/bayesian_gplvm_inducing_3d.npz new file mode 100644 index 00000000..02c89096 Binary files /dev/null and b/GPy/testing/baseline/bayesian_gplvm_inducing_3d.npz differ diff --git a/GPy/testing/baseline/bayesian_gplvm_latent.npz b/GPy/testing/baseline/bayesian_gplvm_latent.npz new file mode 100644 index 00000000..3fba9c06 Binary files /dev/null and b/GPy/testing/baseline/bayesian_gplvm_latent.npz differ diff --git a/GPy/testing/baseline/bayesian_gplvm_latent_3d.npz b/GPy/testing/baseline/bayesian_gplvm_latent_3d.npz new file mode 100644 index 00000000..a4f4edad Binary files /dev/null and b/GPy/testing/baseline/bayesian_gplvm_latent_3d.npz differ diff --git a/GPy/testing/baseline/bayesian_gplvm_magnification.npz b/GPy/testing/baseline/bayesian_gplvm_magnification.npz new file mode 100644 index 00000000..cd5ff303 Binary files /dev/null and b/GPy/testing/baseline/bayesian_gplvm_magnification.npz differ diff --git a/GPy/testing/baseline/coverage_3d_plot.npz b/GPy/testing/baseline/coverage_3d_plot.npz index b8bf090c..cdf55bc8 100644 Binary files a/GPy/testing/baseline/coverage_3d_plot.npz and b/GPy/testing/baseline/coverage_3d_plot.npz differ diff --git a/GPy/testing/baseline/coverage_annotation_interact.npz b/GPy/testing/baseline/coverage_annotation_interact.npz index 61cab600..437ad498 100644 Binary files a/GPy/testing/baseline/coverage_annotation_interact.npz and b/GPy/testing/baseline/coverage_annotation_interact.npz differ diff --git a/GPy/testing/baseline/coverage_gradient.npz b/GPy/testing/baseline/coverage_gradient.npz index 093d563d..32eaf6c6 100644 Binary files a/GPy/testing/baseline/coverage_gradient.npz and b/GPy/testing/baseline/coverage_gradient.npz differ diff --git a/GPy/testing/baseline/coverage_imshow_interact.npz b/GPy/testing/baseline/coverage_imshow_interact.npz index 6679b8b2..78dd7755 100644 Binary files a/GPy/testing/baseline/coverage_imshow_interact.npz and b/GPy/testing/baseline/coverage_imshow_interact.npz differ diff --git a/GPy/testing/baseline/gp_2d_data.npz b/GPy/testing/baseline/gp_2d_data.npz index 154a3716..773660eb 100644 Binary files a/GPy/testing/baseline/gp_2d_data.npz and b/GPy/testing/baseline/gp_2d_data.npz differ diff --git a/GPy/testing/baseline/gp_2d_in_error.npz b/GPy/testing/baseline/gp_2d_in_error.npz index a34e06ab..00ca4eca 100644 Binary files a/GPy/testing/baseline/gp_2d_in_error.npz and b/GPy/testing/baseline/gp_2d_in_error.npz differ diff --git a/GPy/testing/baseline/gp_2d_inducing.npz b/GPy/testing/baseline/gp_2d_inducing.npz index 4848056c..ce6404fc 100644 Binary files a/GPy/testing/baseline/gp_2d_inducing.npz and b/GPy/testing/baseline/gp_2d_inducing.npz differ diff --git a/GPy/testing/baseline/gp_2d_mean.npz b/GPy/testing/baseline/gp_2d_mean.npz index 615a962c..238dc028 100644 Binary files a/GPy/testing/baseline/gp_2d_mean.npz and b/GPy/testing/baseline/gp_2d_mean.npz differ diff --git a/GPy/testing/baseline/gp_3d_data.npz b/GPy/testing/baseline/gp_3d_data.npz index e7d61a0e..1f52eab4 100644 Binary files a/GPy/testing/baseline/gp_3d_data.npz and b/GPy/testing/baseline/gp_3d_data.npz differ diff --git a/GPy/testing/baseline/gp_3d_inducing.npz b/GPy/testing/baseline/gp_3d_inducing.npz index c1d0d121..676a16e5 100644 Binary files a/GPy/testing/baseline/gp_3d_inducing.npz and b/GPy/testing/baseline/gp_3d_inducing.npz differ diff --git a/GPy/testing/baseline/gp_3d_mean.npz b/GPy/testing/baseline/gp_3d_mean.npz index bbb5c150..1a5eed42 100644 Binary files a/GPy/testing/baseline/gp_3d_mean.npz and b/GPy/testing/baseline/gp_3d_mean.npz differ diff --git a/GPy/testing/baseline/gp_class_likelihood.npz b/GPy/testing/baseline/gp_class_likelihood.npz index d9ec94a2..6db3e8ff 100644 Binary files a/GPy/testing/baseline/gp_class_likelihood.npz and b/GPy/testing/baseline/gp_class_likelihood.npz differ diff --git a/GPy/testing/baseline/gp_class_raw.npz b/GPy/testing/baseline/gp_class_raw.npz index 76cda217..f49a775f 100644 Binary files a/GPy/testing/baseline/gp_class_raw.npz and b/GPy/testing/baseline/gp_class_raw.npz differ diff --git a/GPy/testing/baseline/gp_class_raw_link.npz b/GPy/testing/baseline/gp_class_raw_link.npz index ade76e23..231adca7 100644 Binary files a/GPy/testing/baseline/gp_class_raw_link.npz and b/GPy/testing/baseline/gp_class_raw_link.npz differ diff --git a/GPy/testing/baseline/gp_conf.npz b/GPy/testing/baseline/gp_conf.npz index 7b5411e6..d178b5c0 100644 Binary files a/GPy/testing/baseline/gp_conf.npz and b/GPy/testing/baseline/gp_conf.npz differ diff --git a/GPy/testing/baseline/gp_data.npz b/GPy/testing/baseline/gp_data.npz index b1048dab..fef7d0f5 100644 Binary files a/GPy/testing/baseline/gp_data.npz and b/GPy/testing/baseline/gp_data.npz differ diff --git a/GPy/testing/baseline/gp_density.npz b/GPy/testing/baseline/gp_density.npz index 76f41cd9..9bf3d757 100644 Binary files a/GPy/testing/baseline/gp_density.npz and b/GPy/testing/baseline/gp_density.npz differ diff --git a/GPy/testing/baseline/gp_in_error.npz b/GPy/testing/baseline/gp_in_error.npz index 250b5aaf..eb693591 100644 Binary files a/GPy/testing/baseline/gp_in_error.npz and b/GPy/testing/baseline/gp_in_error.npz differ diff --git a/GPy/testing/baseline/gp_mean.npz b/GPy/testing/baseline/gp_mean.npz index c5052134..e47dad83 100644 Binary files a/GPy/testing/baseline/gp_mean.npz and b/GPy/testing/baseline/gp_mean.npz differ diff --git a/GPy/testing/baseline/gp_out_error.npz b/GPy/testing/baseline/gp_out_error.npz index f84851a6..967e322d 100644 Binary files a/GPy/testing/baseline/gp_out_error.npz and b/GPy/testing/baseline/gp_out_error.npz differ diff --git a/GPy/testing/baseline/gp_samples.npz b/GPy/testing/baseline/gp_samples.npz index 059abcb4..5f19e9c4 100644 Binary files a/GPy/testing/baseline/gp_samples.npz and b/GPy/testing/baseline/gp_samples.npz differ diff --git a/GPy/testing/baseline/gplvm_gradient.npz b/GPy/testing/baseline/gplvm_gradient.npz index c2521a94..14ca0cfd 100644 Binary files a/GPy/testing/baseline/gplvm_gradient.npz and b/GPy/testing/baseline/gplvm_gradient.npz differ diff --git a/GPy/testing/baseline/gplvm_latent.npz b/GPy/testing/baseline/gplvm_latent.npz index 4a266b02..fcd07f97 100644 Binary files a/GPy/testing/baseline/gplvm_latent.npz and b/GPy/testing/baseline/gplvm_latent.npz differ diff --git a/GPy/testing/baseline/gplvm_latent_3d.npz b/GPy/testing/baseline/gplvm_latent_3d.npz index 60a153b8..448362ae 100644 Binary files a/GPy/testing/baseline/gplvm_latent_3d.npz and b/GPy/testing/baseline/gplvm_latent_3d.npz differ diff --git a/GPy/testing/baseline/gplvm_magnification.npz b/GPy/testing/baseline/gplvm_magnification.npz index 0a213c34..7275a82a 100644 Binary files a/GPy/testing/baseline/gplvm_magnification.npz and b/GPy/testing/baseline/gplvm_magnification.npz differ diff --git a/GPy/testing/baseline/kern_ARD.npz b/GPy/testing/baseline/kern_ARD.npz index 996833b5..77bedd3d 100644 Binary files a/GPy/testing/baseline/kern_ARD.npz and b/GPy/testing/baseline/kern_ARD.npz differ diff --git a/GPy/testing/baseline/kern_cov_1d.npz b/GPy/testing/baseline/kern_cov_1d.npz index b66d7c9d..285e2e6d 100644 Binary files a/GPy/testing/baseline/kern_cov_1d.npz and b/GPy/testing/baseline/kern_cov_1d.npz differ diff --git a/GPy/testing/baseline/kern_cov_2d.npz b/GPy/testing/baseline/kern_cov_2d.npz index b391339b..d65d1d65 100644 Binary files a/GPy/testing/baseline/kern_cov_2d.npz and b/GPy/testing/baseline/kern_cov_2d.npz differ diff --git a/GPy/testing/baseline/kern_cov_3d.npz b/GPy/testing/baseline/kern_cov_3d.npz index c424d35f..b98bda42 100644 Binary files a/GPy/testing/baseline/kern_cov_3d.npz and b/GPy/testing/baseline/kern_cov_3d.npz differ diff --git a/GPy/testing/baseline/kern_cov_no_lim.npz b/GPy/testing/baseline/kern_cov_no_lim.npz index 52d8c633..aa4b9512 100644 Binary files a/GPy/testing/baseline/kern_cov_no_lim.npz and b/GPy/testing/baseline/kern_cov_no_lim.npz differ diff --git a/GPy/testing/baseline/sparse_gp_class_likelihood.npz b/GPy/testing/baseline/sparse_gp_class_likelihood.npz index 72a6cfc9..5aee4612 100644 Binary files a/GPy/testing/baseline/sparse_gp_class_likelihood.npz and b/GPy/testing/baseline/sparse_gp_class_likelihood.npz differ diff --git a/GPy/testing/baseline/sparse_gp_class_raw.npz b/GPy/testing/baseline/sparse_gp_class_raw.npz index b450f64b..7c9404c8 100644 Binary files a/GPy/testing/baseline/sparse_gp_class_raw.npz and b/GPy/testing/baseline/sparse_gp_class_raw.npz differ diff --git a/GPy/testing/baseline/sparse_gp_class_raw_link.npz b/GPy/testing/baseline/sparse_gp_class_raw_link.npz index d0763e9a..9512e9e7 100644 Binary files a/GPy/testing/baseline/sparse_gp_class_raw_link.npz and b/GPy/testing/baseline/sparse_gp_class_raw_link.npz differ diff --git a/GPy/testing/baseline/sparse_gp_data_error.npz b/GPy/testing/baseline/sparse_gp_data_error.npz index 0914952a..beaea488 100644 Binary files a/GPy/testing/baseline/sparse_gp_data_error.npz and b/GPy/testing/baseline/sparse_gp_data_error.npz differ diff --git a/GPy/testing/plotting_tests.py b/GPy/testing/plotting_tests.py index f050943b..2a3a360c 100644 --- a/GPy/testing/plotting_tests.py +++ b/GPy/testing/plotting_tests.py @@ -252,7 +252,7 @@ def test_kernel(): k2.plot_ARD(['rbf', 'linear', 'bias'], legend=True) k2.plot_covariance(visible_dims=[0, 3], plot_limits=(-1,3)) k2.plot_covariance(visible_dims=[2], plot_limits=(-1, 3)) - k2.plot_covariance(visible_dims=[2, 4], plot_limits=((-1, 0), (5, 3)), projection='3d') + k2.plot_covariance(visible_dims=[2, 4], plot_limits=((-1, 0), (5, 3)), projection='3d', rstride=10, cstride=10) k2.plot_covariance(visible_dims=[1, 4]) for do_test in _image_comparison( baseline_images=['kern_{}'.format(sub) for sub in ["ARD", 'cov_2d', 'cov_1d', 'cov_3d', 'cov_no_lim']], @@ -325,7 +325,7 @@ def test_threed(): m.plot_samples(projection='3d', plot_raw=False, samples=1) plt.close('all') m.plot_data(projection='3d') - m.plot_mean(projection='3d') + m.plot_mean(projection='3d', rstride=10, cstride=10) m.plot_inducing(projection='3d') #m.plot_errorbars_trainset(projection='3d') for do_test in _image_comparison(baseline_images=['gp_3d_{}'.format(sub) for sub in ["data", "mean", 'inducing',