mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-24 14:15:14 +02:00
all kernels working fine with the psi statistics now
This commit is contained in:
parent
16d9536027
commit
de665361a7
5 changed files with 14 additions and 18 deletions
|
|
@ -6,8 +6,8 @@ import pylab as pb
|
|||
import GPy
|
||||
np.random.seed(123344)
|
||||
|
||||
N = 3
|
||||
M = 2
|
||||
N = 10
|
||||
M = 3
|
||||
Q = 2
|
||||
D = 4
|
||||
#generate GPLVM-like data
|
||||
|
|
@ -16,7 +16,7 @@ k = GPy.kern.rbf(Q) + GPy.kern.white(Q, 0.00001)
|
|||
K = k.K(X)
|
||||
Y = np.random.multivariate_normal(np.zeros(N),K,D).T
|
||||
|
||||
k = GPy.kern.bias(Q) #+ GPy.kern.white(Q)
|
||||
k = GPy.kern.linear(Q, ARD = True) + GPy.kern.white(Q)
|
||||
# k = GPy.kern.rbf(Q) + GPy.kern.rbf(Q) + GPy.kern.white(Q)
|
||||
# k = GPy.kern.rbf(Q) + GPy.kern.bias(Q) + GPy.kern.white(Q, 0.00001)
|
||||
# k = GPy.kern.rbf(Q, ARD = False) + GPy.kern.white(Q, 0.00001)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ Y -= Y.mean(axis=0)
|
|||
# Y /= Y.std(axis=0)
|
||||
|
||||
Q = 5
|
||||
k = GPy.kern.linear(Q, ARD = False) + GPy.kern.white(Q)
|
||||
k = GPy.kern.linear(Q, ARD = True) + GPy.kern.white(Q)
|
||||
m = GPy.models.Bayesian_GPLVM(Y, Q, kernel = k, M = 20)
|
||||
m.constrain_positive('(rbf|bias|S|linear|white|noise)')
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ m.constrain_positive('(rbf|bias|S|linear|white|noise)')
|
|||
# m.unconstrain('white')
|
||||
# m.constrain_bounded('white', 1e-6, 10.0)
|
||||
# plot_oil(m.X, np.array([1,1]), labels, 'PCA initialization')
|
||||
# m.optimize(messages = True)
|
||||
m.optimize(messages = True)
|
||||
# m.optimize('tnc', messages = True)
|
||||
# plot_oil(m.X, m.kern.parts[0].lengthscale, labels, 'B-GPLVM')
|
||||
# # pb.figure()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue