mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
predictive_mean changed to predictive_values
This commit is contained in:
parent
451ff74015
commit
9feae765dc
2 changed files with 25 additions and 66 deletions
|
|
@ -215,11 +215,10 @@ class GP(model):
|
|||
|
||||
if self.X.shape[1]==1:
|
||||
Xnew = np.linspace(xmin,xmax,resolution or 200)[:,None]
|
||||
m,v,phi = self.predict(Xnew,slices=which_functions,full_cov=full_cov)
|
||||
m,v = self.predict(Xnew,slices=which_functions,full_cov=full_cov)
|
||||
if self.EP:
|
||||
pb.subplot(211)
|
||||
gpplot(Xnew,m,v)
|
||||
|
||||
if samples: #NOTE why don't we put samples as a parameter of gpplot
|
||||
s = np.random.multivariate_normal(m.flatten(),np.diag(v.flatten()),samples)
|
||||
pb.plot(Xnew.flatten(),s.T, alpha = 0.4, c='#3465a4', linewidth = 0.8)
|
||||
|
|
@ -227,9 +226,7 @@ class GP(model):
|
|||
pb.xlim(xmin,xmax)
|
||||
|
||||
if self.EP:
|
||||
pb.subplot(212)
|
||||
self.likelihood.plot(Xnew,m,v,phi,self.X,samples=samples)
|
||||
pb.xlim(xmin,xmax)
|
||||
phi_m, phi_v, phi_l, phi_u = self.likelihood.predictive_values(m,v)
|
||||
|
||||
elif self.X.shape[1]==2:
|
||||
resolution = 50 or resolution
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue