mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-11 21:12:38 +02:00
merging by hand...
This commit is contained in:
commit
850f2fb470
31 changed files with 597 additions and 96 deletions
|
|
@ -37,7 +37,6 @@ def BGPLVM(seed=default_seed):
|
|||
# m.optimize(messages = 1)
|
||||
# m.plot()
|
||||
# pb.title('After optimisation')
|
||||
m.ensure_default_constraints()
|
||||
m.randomize()
|
||||
m.checkgrad(verbose=1)
|
||||
|
||||
|
|
@ -53,7 +52,6 @@ def GPLVM_oil_100(optimize=True):
|
|||
m.data_labels = data['Y'].argmax(axis=1)
|
||||
|
||||
# optimize
|
||||
m.ensure_default_constraints()
|
||||
if optimize:
|
||||
m.optimize('scg', messages=1)
|
||||
|
||||
|
|
@ -108,7 +106,6 @@ def swiss_roll(optimize=True, N=1000, num_inducing=15, Q=4, sigma=.2, plot=False
|
|||
m.data_colors = c
|
||||
m.data_t = t
|
||||
|
||||
m.ensure_default_constraints()
|
||||
m['rbf_lengthscale'] = 1. # X.var(0).max() / X.var(0)
|
||||
m['noise_variance'] = Y.var() / 100.
|
||||
m['bias_variance'] = 0.05
|
||||
|
|
@ -134,7 +131,6 @@ def BGPLVM_oil(optimize=True, N=200, Q=10, num_inducing=15, max_f_eval=50, plot=
|
|||
m['.*lengt'] = 1. # m.X.var(0).max() / m.X.var(0)
|
||||
m['noise'] = Yn.var() / 100.
|
||||
|
||||
m.ensure_default_constraints()
|
||||
|
||||
# optimize
|
||||
if optimize:
|
||||
|
|
@ -159,7 +155,6 @@ def oil_100():
|
|||
m = GPy.models.GPLVM(data['X'], 2)
|
||||
|
||||
# optimize
|
||||
m.ensure_default_constraints()
|
||||
m.optimize(messages=1, max_iters=2)
|
||||
|
||||
# plot
|
||||
|
|
@ -239,7 +234,6 @@ def bgplvm_simulation_matlab_compare():
|
|||
# X=mu,
|
||||
# X_variance=S,
|
||||
_debug=False)
|
||||
m.ensure_default_constraints()
|
||||
m.auto_scale_factor = True
|
||||
m['noise'] = Y.var() / 100.
|
||||
m['linear_variance'] = .01
|
||||
|
|
@ -263,7 +257,6 @@ def bgplvm_simulation(optimize='scg',
|
|||
m = BayesianGPLVM(Y, Q, init="PCA", num_inducing=num_inducing, kernel=k, _debug=True)
|
||||
|
||||
# m.constrain('variance|noise', logexp_clipped())
|
||||
m.ensure_default_constraints()
|
||||
m['noise'] = Y.var() / 100.
|
||||
m['linear_variance'] = .01
|
||||
|
||||
|
|
@ -292,7 +285,6 @@ def mrd_simulation(optimize=True, plot=True, plot_sim=True, **kw):
|
|||
for i, Y in enumerate(Ylist):
|
||||
m['{}_noise'.format(i + 1)] = Y.var() / 100.
|
||||
|
||||
m.ensure_default_constraints()
|
||||
|
||||
# DEBUG
|
||||
# np.seterr("raise")
|
||||
|
|
@ -320,7 +312,6 @@ def brendan_faces():
|
|||
# optimize
|
||||
m.constrain('rbf|noise|white', GPy.core.transformations.logexp_clipped())
|
||||
|
||||
m.ensure_default_constraints()
|
||||
m.optimize('scg', messages=1, max_f_eval=10000)
|
||||
|
||||
ax = m.plot_latent(which_indices=(0, 1))
|
||||
|
|
@ -346,7 +337,6 @@ def stick():
|
|||
data = GPy.util.datasets.stick()
|
||||
# optimize
|
||||
m = GPy.models.GPLVM(data['Y'], 2)
|
||||
m.ensure_default_constraints()
|
||||
m.optimize(messages=1, max_f_eval=10000)
|
||||
m._set_params(m._get_params())
|
||||
plt.clf
|
||||
|
|
@ -388,7 +378,6 @@ def cmu_mocap(subject='35', motion=['01'], in_place=True):
|
|||
m = GPy.models.GPLVM(data['Y'], 2, normalize_Y=True)
|
||||
|
||||
# optimize
|
||||
m.ensure_default_constraints()
|
||||
m.optimize(messages=1, max_f_eval=10000)
|
||||
|
||||
ax = m.plot_latent()
|
||||
|
|
@ -420,7 +409,6 @@ def cmu_mocap(subject='35', motion=['01'], in_place=True):
|
|||
# m.set('iip', Z)
|
||||
# m.set('bias', 1e-4)
|
||||
# # optimize
|
||||
# # m.ensure_default_constraints()
|
||||
#
|
||||
# import pdb; pdb.set_trace()
|
||||
# m.optimize('tnc', messages=1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue