mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-08 15:05:15 +02:00
added a default kernel option in BGPLVM
This commit is contained in:
parent
8761f72c59
commit
bfd2166469
1 changed files with 4 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ class Bayesian_GPLVM(sparse_GP, GPLVM):
|
|||
:type init: 'PCA'|'random'
|
||||
|
||||
"""
|
||||
def __init__(self, Y, Q, init='PCA', M=10, Z=None, **kwargs):
|
||||
def __init__(self, Y, Q, init='PCA', M=10, Z=None, kernel=None, **kwargs):
|
||||
X = self.initialise_latent(init, Q, Y)
|
||||
|
||||
if Z is None:
|
||||
|
|
@ -30,10 +30,11 @@ class Bayesian_GPLVM(sparse_GP, GPLVM):
|
|||
else:
|
||||
assert Z.shape[1]==X.shape[1]
|
||||
|
||||
kernel = kern.rbf(Q) + kern.white(Q)
|
||||
if kernel is None:
|
||||
kernel = kern.rbf(Q) + kern.white(Q)
|
||||
|
||||
S = np.ones_like(X) * 1e-2#
|
||||
sparse_GP.__init__(self, X, Gaussian(Y), X_uncertainty=S, Z=Z,**kwargs)
|
||||
sparse_GP.__init__(self, X, Gaussian(Y), kernel, Z=Z, X_uncertainty=S, **kwargs)
|
||||
|
||||
def _get_param_names(self):
|
||||
X_names = sum([['X_%i_%i'%(n,q) for n in range(self.N)] for q in range(self.Q)],[])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue