Skip to content

Commit

Permalink
reverting some changes in GP prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
j-faria committed Sep 9, 2020
1 parent 80cbdfe commit 1237c92
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pykima/GP.py
Expand Up @@ -153,10 +153,7 @@ def predict_with_hyperpars(self, results, sample, t=None, add_parts=True,
pred = self.predict(y, t, return_cov=False, return_std=return_std)
return pred

mu = self.predict(y, results.t, return_cov=False,
return_std=return_std)
if return_std:
mu, std = mu
mu = self.predict(y, results.t, return_cov=False)

if add_parts:
# add the trend back
Expand All @@ -167,8 +164,7 @@ def predict_with_hyperpars(self, results, sample, t=None, add_parts=True,
for i in range(1, results.n_instruments):
mu[results.obs == i] += sample[results.indices['inst_offsets']][i-1]

return mu, std

return mu

def sample_conditional(self, y, t, size=1):
"""
Expand Down

0 comments on commit 1237c92

Please sign in to comment.