mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-13 22:12:38 +02:00
allowed GP models to plot multiple outputs (in 1D at least)
This commit is contained in:
parent
4bbf31eb1d
commit
8dcd197436
1 changed files with 3 additions and 2 deletions
|
|
@ -253,8 +253,9 @@ class GP(model):
|
||||||
|
|
||||||
Xnew, xmin, xmax = x_frame1D(Xu, plot_limits=plot_limits)
|
Xnew, xmin, xmax = x_frame1D(Xu, plot_limits=plot_limits)
|
||||||
m, var, lower, upper = self.predict(Xnew, which_parts=which_parts)
|
m, var, lower, upper = self.predict(Xnew, which_parts=which_parts)
|
||||||
gpplot(Xnew, m, lower, upper)
|
for d in range(m.shape[1]):
|
||||||
pb.plot(Xu[which_data], self.likelihood.data[which_data], 'kx', mew=1.5)
|
gpplot(Xnew, m[:,d], lower[:,d], upper[:,d])
|
||||||
|
pb.plot(Xu[which_data], self.likelihood.data[which_data,d], 'kx', mew=1.5)
|
||||||
if self.has_uncertain_inputs:
|
if self.has_uncertain_inputs:
|
||||||
pb.errorbar(Xu[which_data, 0], self.likelihood.data[which_data, 0],
|
pb.errorbar(Xu[which_data, 0], self.likelihood.data[which_data, 0],
|
||||||
xerr=2 * np.sqrt(self.X_variance[which_data, 0]),
|
xerr=2 * np.sqrt(self.X_variance[which_data, 0]),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue