mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-09 20:12:38 +02:00
[sparsegplvm] added sparsegplvm and tests for minibatch sparsegplvm
This commit is contained in:
parent
99caca6702
commit
b0347c5108
4 changed files with 107 additions and 2 deletions
|
|
@ -106,7 +106,7 @@ class BayesianGPLVMMiniBatch(SparseGPMiniBatch):
|
|||
super(BayesianGPLVMMiniBatch,self).parameters_changed()
|
||||
|
||||
kl_fctr = self.kl_factr
|
||||
if kl_fctr > 0:
|
||||
if kl_fctr > 0 and self.has_uncertain_inputs():
|
||||
Xgrad = self.X.gradient.copy()
|
||||
self.X.gradient[:] = 0
|
||||
self.variational_prior.update_gradients_KL(self.X)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import sys
|
||||
from .sparse_gp_regression import SparseGPRegression
|
||||
from ..core import Param
|
||||
|
||||
class SparseGPLVM(SparseGPRegression):
|
||||
"""
|
||||
|
|
@ -21,7 +22,9 @@ class SparseGPLVM(SparseGPRegression):
|
|||
if X is None:
|
||||
from ..util.initialization import initialize_latent
|
||||
X, fracs = initialize_latent(init, input_dim, Y)
|
||||
X = Param('latent space', X)
|
||||
SparseGPRegression.__init__(self, X, Y, kernel=kernel, num_inducing=num_inducing)
|
||||
self.link_parameter(self.X, 0)
|
||||
|
||||
def parameters_changed(self):
|
||||
super(SparseGPLVM, self).parameters_changed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue