mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-27 14:25:16 +02:00
plot_latent added for mrd
This commit is contained in:
parent
89a50e260a
commit
de6b00ebfd
1 changed files with 41 additions and 44 deletions
|
|
@ -77,15 +77,12 @@ class GPLVM(GP):
|
|||
if self.Q==2:
|
||||
input_1, input_2 = 0,1
|
||||
else:
|
||||
# try to find a linear of RBF kern in the kernel
|
||||
k = [p for p in self.kern.parts if p.name in ['rbf', 'linear']]
|
||||
if (not len(k) == 1) or (not k[0].ARD):
|
||||
try:
|
||||
input_1, input_2 = np.argsort(self.input_sensitivity())[:2]
|
||||
except:
|
||||
raise ValueError, "cannot Atomatically determine which dimensions to plot, please pass 'which_indices'"
|
||||
k = k[0]
|
||||
if k.name == 'rbf':
|
||||
input_1, input_2 = np.argsort(k.lengthscale)[:2]
|
||||
elif k.name == 'linear':
|
||||
input_1, input_2 = np.argsort(k.variances)[::-1][:2]
|
||||
else:
|
||||
input_1, input_2 = which_indices
|
||||
|
||||
#first, plot the output variance as a function of the latent space
|
||||
Xtest, xx,yy,xmin,xmax = util.plot.x_frame2D(self.X[:,[input_1, input_2]],resolution=resolution)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue