mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-14 14:32:37 +02:00
ensuring the shape of the mean vector at predict time fixes bug in EP prediction
This commit is contained in:
parent
938cc49aed
commit
ce9ee6c758
1 changed files with 2 additions and 0 deletions
|
|
@ -201,6 +201,8 @@ class GP(Model):
|
||||||
|
|
||||||
Kx = kern.K(self.X, Xnew)
|
Kx = kern.K(self.X, Xnew)
|
||||||
mu = np.dot(Kx.T, self.posterior.woodbury_vector)
|
mu = np.dot(Kx.T, self.posterior.woodbury_vector)
|
||||||
|
if len(mu.shape)==1:
|
||||||
|
mu = mu.reshape(-1,1)
|
||||||
if full_cov:
|
if full_cov:
|
||||||
Kxx = kern.K(Xnew)
|
Kxx = kern.K(Xnew)
|
||||||
if self.posterior.woodbury_inv.ndim == 2:
|
if self.posterior.woodbury_inv.ndim == 2:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue