mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-27 14:25:16 +02:00
Fixed some tests
This commit is contained in:
parent
5db256a841
commit
10fcb4027b
2 changed files with 4 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ def bgplvm_test_model(seed=default_seed, optimize=False, verbose=1, plot=False):
|
||||||
# randomly obstruct data with percentage p
|
# randomly obstruct data with percentage p
|
||||||
p = .8
|
p = .8
|
||||||
Y_obstruct = Y.copy()
|
Y_obstruct = Y.copy()
|
||||||
Y_obstruct[np.random.uniform(size=(Y.shape)) < p] = np.nan
|
Y_obstruct[_np.random.uniform(size=(Y.shape)) < p] = _np.nan
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
m2 = GPy.models.BayesianGPLVMWithMissingData(Y_obstruct, input_dim, kernel=k, num_inducing=num_inducing)
|
m2 = GPy.models.BayesianGPLVMWithMissingData(Y_obstruct, input_dim, kernel=k, num_inducing=num_inducing)
|
||||||
m.lengthscales = lengthscales
|
m.lengthscales = lengthscales
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import numpy as np
|
||||||
import pylab as pb
|
import pylab as pb
|
||||||
import sys, pdb
|
import sys, pdb
|
||||||
from sparse_gp_regression import SparseGPRegression
|
from sparse_gp_regression import SparseGPRegression
|
||||||
from gplvm import GPLVM
|
from gplvm import GPLVM, initialise_latent
|
||||||
# from .. import kern
|
# from .. import kern
|
||||||
# from ..core import model
|
# from ..core import model
|
||||||
# from ..util.linalg import pdinv, PCA
|
# from ..util.linalg import pdinv, PCA
|
||||||
|
|
@ -24,7 +24,7 @@ class SparseGPLVM(SparseGPRegression, GPLVM):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, Y, input_dim, kernel=None, init='PCA', num_inducing=10):
|
def __init__(self, Y, input_dim, kernel=None, init='PCA', num_inducing=10):
|
||||||
X = self.initialise_latent(init, input_dim, Y)
|
X = initialise_latent(init, input_dim, Y)
|
||||||
SparseGPRegression.__init__(self, X, Y, kernel=kernel, num_inducing=num_inducing)
|
SparseGPRegression.__init__(self, X, Y, kernel=kernel, num_inducing=num_inducing)
|
||||||
self.ensure_default_constraints()
|
self.ensure_default_constraints()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue