mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-11 15:15:15 +02:00
BGPLVM test for crossterms
This commit is contained in:
parent
ddf106dd32
commit
d2d1d58db3
1 changed files with 8 additions and 5 deletions
|
|
@ -12,10 +12,10 @@ from GPy.likelihoods.gaussian import Gaussian
|
|||
default_seed = np.random.seed(123344)
|
||||
|
||||
def BGPLVM(seed=default_seed):
|
||||
N = 5
|
||||
num_inducing = 4
|
||||
Q = 3
|
||||
D = 2
|
||||
N = 13
|
||||
num_inducing = 5
|
||||
Q = 6
|
||||
D = 25
|
||||
# generate GPLVM-like data
|
||||
X = np.random.rand(N, Q)
|
||||
lengthscales = np.random.rand(Q)
|
||||
|
|
@ -25,9 +25,12 @@ def BGPLVM(seed=default_seed):
|
|||
Y = np.random.multivariate_normal(np.zeros(N), K, D).T
|
||||
lik = Gaussian(Y, normalize=True)
|
||||
|
||||
k = GPy.kern.rbf_inv(Q, .5, np.ones(Q) * 2., ARD=True) + GPy.kern.bias(Q) + GPy.kern.white(Q)
|
||||
# k = GPy.kern.rbf_inv(Q, .5, np.ones(Q) * 2., ARD=True) + GPy.kern.bias(Q) + GPy.kern.white(Q)
|
||||
# k = GPy.kern.linear(Q) + GPy.kern.bias(Q) + GPy.kern.white(Q, 0.00001)
|
||||
# k = GPy.kern.rbf(Q, ARD = False) + GPy.kern.white(Q, 0.00001)
|
||||
# k = GPy.kern.rbf(Q, .5, np.ones(Q) * 2., ARD=True) + GPy.kern.rbf(Q, .3, np.ones(Q) * .2, ARD=True)
|
||||
k = GPy.kern.rbf(Q, .5, np.ones(Q) * 2., ARD=True) + GPy.kern.linear(Q, np.ones(Q) * .2, ARD=True)
|
||||
# k = GPy.kern.rbf(Q, .5, 2., ARD=0) + GPy.kern.rbf(Q, .3, .2, ARD=0)
|
||||
|
||||
m = GPy.models.BayesianGPLVM(lik, Q, kernel=k, num_inducing=num_inducing)
|
||||
m.lengthscales = lengthscales
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue