modified: GPy/examples/dimensionality_reduction.py

brendan_faces(): normalizing the feature vectors w.r.t. the
global mean and standard deviation.
Changed optimisation constraints because it was never converging.
This commit is contained in:
Teo de Campos 2013-05-16 17:08:05 +01:00
parent f69dda71ea
commit 70459be588

View file

@ -365,13 +365,23 @@ def mrd_silhouette():
pass
def brendan_faces():
from GPy import kern
data = GPy.util.datasets.brendan_faces()
Y = data['Y'][0:-1:10, :]
m = GPy.models.GPLVM(data['Y'], 2)
Q = 2
# Y = data['Y'][0:-1:2, :]
Y = data['Y']
Yn = Y - Y.mean()
Yn /= Yn.std()
m = GPy.models.GPLVM(Yn, Q)#, M=Y.shape[0]/4)
# optimize
# m.constrain_fixed('white', 1e-2)
# m.constrain_bounded('noise', 1e-6, 10)
m.constrain('rbf', GPy.core.transformations.logexp_clipped())
m.ensure_default_constraints()
m.optimize(messages=1, max_f_eval=10000)
m.optimize('scg', messages=1, max_f_eval=10000)
ax = m.plot_latent()
y = m.likelihood.Y[0, :]