mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-02 08:12:39 +02:00
Fixed two small lbugs
This commit is contained in:
parent
8377d95fbe
commit
8ad774cb4e
2 changed files with 2 additions and 2 deletions
|
|
@ -175,7 +175,7 @@ class EP(EPBase, ExactGaussianInference):
|
|||
if self.ep_mode=="nested":
|
||||
#Force EP at each step of the optimization
|
||||
self._ep_approximation = None
|
||||
post_params, ga_approx, log_Z_tilde = self._ep_approximation = self.expectation_propagation(K, Y, likelihood, Y_metadata)
|
||||
post_params, ga_approx, cav_params, log_Z_tilde = self._ep_approximation = self.expectation_propagation(K, Y, likelihood, Y_metadata)
|
||||
elif self.ep_mode=="alternated":
|
||||
if getattr(self, '_ep_approximation', None) is None:
|
||||
#if we don't yet have the results of runnign EP, run EP and store the computed factors in self._ep_approximation
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Gaussian(Likelihood):
|
|||
def ep_gradients(self, Y, cav_tau, cav_v, dL_dKdiag,Y_metadata=None):
|
||||
return self.exact_inference_gradients(dL_dKdiag)
|
||||
|
||||
def exact_inference_gradients(self, dL_dKdiag):
|
||||
def exact_inference_gradients(self, dL_dKdiag, Y_metadata=None):
|
||||
return dL_dKdiag.sum()
|
||||
|
||||
def _preprocess_values(self, Y):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue