mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 16:52:39 +02:00
[plotting] catching 3d error for plotting latent space in other then 2 dimensions
This commit is contained in:
parent
e75f78d702
commit
e917da8cce
1 changed files with 3 additions and 1 deletions
|
|
@ -229,7 +229,7 @@ def plot_latent(self, labels=None, which_indices=None,
|
|||
plot_limits=None,
|
||||
updates=False,
|
||||
kern=None, marker='<>^vsd',
|
||||
num_samples=1000,
|
||||
num_samples=1000, projection='2d',
|
||||
scatter_kwargs=None, **imshow_kwargs):
|
||||
"""
|
||||
Plot the latent space of the GP on the inputs. This is the
|
||||
|
|
@ -249,6 +249,8 @@ def plot_latent(self, labels=None, which_indices=None,
|
|||
:param imshow_kwargs: the kwargs for the imshow (magnification factor)
|
||||
:param scatter_kwargs: the kwargs for the scatter plots
|
||||
"""
|
||||
if projection != '2d':
|
||||
raise ValueError('Cannot plot latent in other then 2 dimensions, consider plot_scatter')
|
||||
input_1, input_2 = which_indices = self.get_most_significant_input_dimensions(which_indices)[:2]
|
||||
X = get_x_y_var(self)[0]
|
||||
_, _, Xgrid, _, _, xmin, xmax, resolution = helper_for_plot_data(self, X, plot_limits, which_indices, None, resolution)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue