mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-14 14:32:37 +02:00
BGPLVM working
This commit is contained in:
parent
936d08723e
commit
ff1b64022e
2 changed files with 1 additions and 7 deletions
|
|
@ -31,7 +31,7 @@ N, D = Y.shape
|
|||
Y -= Y.mean(axis=0)
|
||||
#Y /= Y.std(axis=0)
|
||||
|
||||
Q = 7
|
||||
Q = 10
|
||||
k = GPy.kern.rbf_ARD(Q) + GPy.kern.white(Q)
|
||||
m = GPy.models.Bayesian_GPLVM(Y, Q, kernel = k, M = 12)
|
||||
m.constrain_positive('(rbf|bias|S|white|noise)')
|
||||
|
|
|
|||
|
|
@ -57,12 +57,6 @@ class Bayesian_GPLVM(sparse_GP_regression, GPLVM):
|
|||
|
||||
return np.hstack((dL_dmu.flatten(), dL_dS.flatten()))
|
||||
|
||||
|
||||
def log_likelihood_gradients(self):
|
||||
return np.hstack((self.dL_dmuS().flatten(), sparse_GP_regression.log_likelihood_gradients(self)))
|
||||
|
||||
def plot(self):
|
||||
GPLVM.plot(self)
|
||||
#passing Z without a small amout of jitter will induce the white kernel where we don;t want it!
|
||||
mu, var = sparse_GP_regression.predict(self, self.Z+np.random.randn(*self.Z.shape)*0.0001)
|
||||
pb.plot(mu[:, 0] , mu[:, 1], 'ko')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue