Merge branch 'devel' of https://github.com/SheffieldML/GPy into devel

Conflicts:
	GPy/examples/dimensionality_reduction.py
This commit is contained in:
Neil Lawrence 2013-05-05 08:01:47 +01:00
commit 7ffcefc511
20 changed files with 981 additions and 409 deletions

View file

@ -82,7 +82,7 @@ def BGPLVM_oil(optimize=True, N=100, Q=10, M=15, max_f_eval=300):
m.ensure_default_constraints()
y = m.likelihood.Y[0, :]
fig,(latent_axes,sense_axes) = plt.subplots(1,2)
fig, (latent_axes, hist_axes) = plt.subplots(1, 2)
plt.sca(latent_axes)
m.plot_latent()
data_show = GPy.util.visualize.vector_show(y)
@ -181,15 +181,26 @@ def bgplvm_simulation_matlab_compare():
from GPy.models import mrd
from GPy import kern
reload(mrd); reload(kern)
k = kern.rbf(Q, ARD=True) + kern.bias(Q, np.exp(-2)) + kern.white(Q, np.exp(-2))
# k = kern.rbf(Q, ARD=True) + kern.bias(Q, np.exp(-2)) + kern.white(Q, np.exp(-2))
k = kern.linear(Q, ARD=True) + kern.bias(Q, np.exp(-2)) + kern.white(Q, np.exp(-2))
m = Bayesian_GPLVM(Y, Q, init="PCA", M=M, kernel=k,
# X=mu,
# X_variance=S,
_debug=True)
m.ensure_default_constraints()
m.auto_scale_factor = True
m['noise'] = .01 # Y.var() / 100.
m['{}_variance'.format(k.parts[0].name)] = .01
m['noise'] = Y.var() / 100.
m['linear_variance'] = .01
# lscstr = 'X_variance'
# m[lscstr] = .01
# m.unconstrain(lscstr); m.constrain_fixed(lscstr, .1)
# cstr = 'white'
# m.unconstrain(cstr); m.constrain_bounded(cstr, .01, 1.)
# cstr = 'noise'
# m.unconstrain(cstr); m.constrain_bounded(cstr, .01, 1.)
return m
def bgplvm_simulation(burnin='scg', plot_sim=False,
@ -385,7 +396,7 @@ def cmu_mocap(subject='35', motion=['01'], in_place=True):
Y = data['Y']
if in_place:
# Make figure move in place.
data['Y'][:, 0:3]=0.0
data['Y'][:, 0:3] = 0.0
m = GPy.models.GPLVM(data['Y'], 2, normalize_Y=True)
# optimize