Skip to content

Commit

Permalink
Fix after GPy version update
Browse files Browse the repository at this point in the history
  • Loading branch information
apaleyes committed May 21, 2021
1 parent b793989 commit 90231e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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 @@ -105,7 +105,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.model.posterior_covariance_between_points(X1, X2)
return self.model.posterior_covariance_between_points(X1, X2, include_likelihood=False)

@property
def X(self) -> np.ndarray:
Expand Down Expand Up @@ -239,7 +239,7 @@ def calculate_variance_reduction(self, x_train_new: np.ndarray, x_test: np.ndarr
"""
fidelities_train_new = x_train_new[:, -1]
y_metadata = {'output_index': fidelities_train_new.astype(int)}
covariance = self.gpy_model.posterior_covariance_between_points(x_train_new, x_test)
covariance = self.gpy_model.posterior_covariance_between_points(x_train_new, x_test, include_likelihood=False)
variance_prediction = self.gpy_model.predict(x_train_new, Y_metadata=y_metadata)[1]
return covariance**2 / variance_prediction

Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ numpy>=1.14.5
# This is unfortunate - we don't need matplotlib
# but until GPy and GPyOpt get their dependencies straight
# we need GPy's plotting extra to ensure smooth installation
GPy[plotting]>=1.9.9
GPy[plotting]>=1.10.0
emcee>=2.2.1
scipy>=1.1.0

0 comments on commit 90231e8

Please sign in to comment.