fix: samples tests and plotting, multioutput

This commit is contained in:
mzwiessele 2018-09-02 19:07:23 +01:00
parent 270b90857c
commit 8446da628b
45 changed files with 15 additions and 17 deletions

View file

@ -578,7 +578,7 @@ class GP(Model):
mag[n] = np.sqrt(np.linalg.det(G[n, :, :]))
return mag
def posterior_samples_f(self,X, size=10, **predict_kwargs):
def posterior_samples_f(self,X, size=10, **predict_kwargs):
"""
Samples the posterior GP at the points X.
@ -589,7 +589,8 @@ class GP(Model):
:returns: set of simulations
:rtype: np.ndarray (Nnew x D x samples)
"""
m, v = self._raw_predict(X, full_cov=True, **predict_kwargs)
predict_kwargs["full_cov"] = True # Always use the full covariance for posterior samples.
m, v = self._raw_predict(X, **predict_kwargs)
if self.normalizer is not None:
m, v = self.normalizer.inverse_mean(m), self.normalizer.inverse_variance(v)