mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-09 12:02:38 +02:00
Merge branch 'devel' into minibatch
This commit is contained in:
commit
7d2ffcde20
50 changed files with 124 additions and 73 deletions
|
|
@ -61,7 +61,7 @@ class BayesianGPLVM(SparseGP_MPI):
|
|||
else:
|
||||
from ..inference.latent_function_inference.var_dtc import VarDTC
|
||||
self.logger.debug("creating inference_method var_dtc")
|
||||
inference_method = VarDTC(limit=1 if not missing_data else Y.shape[1])
|
||||
inference_method = VarDTC(limit=3 if not missing_data else Y.shape[1])
|
||||
if isinstance(inference_method,VarDTC_minibatch):
|
||||
inference_method.mpi_comm = mpi_comm
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class BayesianGPLVMMiniBatch(SparseGPMiniBatch):
|
|||
if inference_method is None:
|
||||
from ..inference.latent_function_inference.var_dtc import VarDTC
|
||||
self.logger.debug("creating inference_method var_dtc")
|
||||
inference_method = VarDTC(limit=1 if not missing_data else Y.shape[1])
|
||||
inference_method = VarDTC(limit=3 if not missing_data else Y.shape[1])
|
||||
|
||||
super(BayesianGPLVMMiniBatch,self).__init__(X, Y, Z, kernel, likelihood=likelihood,
|
||||
name=name, inference_method=inference_method,
|
||||
|
|
@ -126,4 +126,4 @@ class BayesianGPLVMMiniBatch(SparseGPMiniBatch):
|
|||
d = self.output_dim
|
||||
self._log_marginal_likelihood -= kl_fctr*self.variational_prior.KL_divergence(self.X)*self.stochastics.batchsize/d
|
||||
|
||||
self._Xgrad = self.X.gradient.copy()
|
||||
self._Xgrad = self.X.gradient.copy()
|
||||
|
|
|
|||
|
|
@ -41,4 +41,4 @@ class GPLVM(GP):
|
|||
|
||||
def parameters_changed(self):
|
||||
super(GPLVM, self).parameters_changed()
|
||||
self.X.gradient = self.kern.gradients_X(self.grad_dict['dL_dK'], self.X, None)
|
||||
self.X.gradient = self.kern.gradients_X(self.grad_dict['dL_dK'], self.X, None)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class SparseGPMiniBatch(SparseGP):
|
|||
# pick a sensible inference method
|
||||
if inference_method is None:
|
||||
if isinstance(likelihood, likelihoods.Gaussian):
|
||||
inference_method = var_dtc.VarDTC(limit=1 if not missing_data else Y.shape[1])
|
||||
inference_method = var_dtc.VarDTC(limit=3 if not missing_data else Y.shape[1])
|
||||
else:
|
||||
#inference_method = ??
|
||||
raise NotImplementedError("what to do what to do?")
|
||||
|
|
|
|||
|
|
@ -62,4 +62,4 @@ class SparseGPRegression(SparseGP_MPI):
|
|||
if isinstance(self.inference_method,VarDTC_minibatch):
|
||||
update_gradients_sparsegp(self, mpi_comm=self.mpi_comm)
|
||||
else:
|
||||
super(SparseGPRegression, self).parameters_changed()
|
||||
super(SparseGPRegression, self).parameters_changed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue