mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-10 20:42:39 +02:00
readded mrd plotting changes
This commit is contained in:
parent
51ff92e591
commit
5f76e7cd12
2 changed files with 4 additions and 2 deletions
|
|
@ -126,8 +126,8 @@ def mrd_simulation():
|
|||
s2 = np.vectorize(lambda x: np.cos(x))
|
||||
sS = np.vectorize(lambda x: np.sin(2 * x))
|
||||
|
||||
S1 = np.hstack([s1(x), sS(x)])
|
||||
S2 = np.hstack([s2(x), sS(x)])
|
||||
S1 = np.hstack([s1(x), sS(x)]) + .1 * np.random.randn(N, 2)
|
||||
S2 = np.hstack([s2(x), sS(x)]) + .1 * np.random.randn(N, 2)
|
||||
|
||||
Y1 = S1.dot(np.random.randn(S1.shape[1], D1))
|
||||
Y2 = S2.dot(np.random.randn(S2.shape[1], D2))
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ class MRD(model):
|
|||
|
||||
def plot_scales(self, *args, **kwargs):
|
||||
fig = pylab.figure("MRD Scales", figsize=(4 * len(self.bgplvms), 3))
|
||||
fig.clf()
|
||||
for i, g in enumerate(self.bgplvms):
|
||||
ax = fig.add_subplot(1, len(self.bgplvms), i + 1)
|
||||
g.kern.plot_ARD(ax=ax, *args, **kwargs)
|
||||
|
|
@ -172,6 +173,7 @@ class MRD(model):
|
|||
|
||||
def plot_latent(self, *args, **kwargs):
|
||||
fig = pylab.figure("MRD Latent Spaces", figsize=(4 * len(self.bgplvms), 3))
|
||||
fig.clf()
|
||||
for i, g in enumerate(self.bgplvms):
|
||||
ax = fig.add_subplot(1, len(self.bgplvms), i + 1)
|
||||
g.plot_latent(ax=ax, *args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue