mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 16:52:39 +02:00
[plotting] tests
This commit is contained in:
parent
108ae55fbc
commit
661d9f5724
43 changed files with 6 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue