mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 21:42:39 +02:00
merged dimen reduction
This commit is contained in:
commit
9c126d9b94
11 changed files with 618 additions and 114 deletions
|
|
@ -351,6 +351,26 @@ def brendan_faces():
|
|||
raw_input('Press enter to finish')
|
||||
|
||||
return m
|
||||
|
||||
def olivetti_faces():
|
||||
from GPy import kern
|
||||
data = GPy.util.datasets.olivetti_faces()
|
||||
Q = 2
|
||||
Y = data['Y']
|
||||
Yn = Y - Y.mean()
|
||||
Yn /= Yn.std()
|
||||
|
||||
m = GPy.models.GPLVM(Yn, Q)
|
||||
m.optimize('scg', messages=1, max_iters=1000)
|
||||
|
||||
ax = m.plot_latent(which_indices=(0, 1))
|
||||
y = m.likelihood.Y[0, :]
|
||||
data_show = GPy.util.visualize.image_show(y[None, :], dimensions=(112, 92), transpose=False, invert=False, scale=False)
|
||||
lvm_visualizer = GPy.util.visualize.lvm(m.X[0, :].copy(), m, data_show, ax)
|
||||
raw_input('Press enter to finish')
|
||||
|
||||
return m
|
||||
|
||||
def stick_play(range=None, frame_rate=15):
|
||||
data = GPy.util.datasets.osu_run1()
|
||||
# optimize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue