Skip to content

Commit

Permalink
More fixes of GPy updated API (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
apaleyes authored May 21, 2021
1 parent 90231e8 commit 085291d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions emukit/model_wrappers/gpy_model_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def calculate_variance_reduction(self, x_train_new: np.ndarray, x_test: np.ndarr
"""
Computes the variance reduction at x_test, if a new point at x_train_new is acquired
"""
covariance = self.model.posterior_covariance_between_points(x_train_new, x_test)
covariance = self.model.posterior_covariance_between_points(x_train_new, x_test, include_likelihood=False)
variance_prediction = self.model.predict(x_train_new)[1]
return covariance**2 / variance_prediction

Expand Down Expand Up @@ -317,7 +317,7 @@ def get_covariance_between_points(self, X1: np.ndarray, X2: np.ndarray) -> np.nd
argument to the posterior covariance function.
:return: An array of shape n_points x 1 of posterior covariances between X1 and X2
"""
return self.gpy_model.posterior_covariance_between_points(X1, X2)
return self.gpy_model.posterior_covariance_between_points(X1, X2, include_likelihood=False)

def generate_hyperparameters_samples(self, n_samples = 10, n_burnin = 5, subsample_interval = 1,
step_size = 1e-1, leapfrog_steps = 1) -> None:
Expand Down

0 comments on commit 085291d

Please sign in to comment.