linear and rbf fix for variational gradients in Z

This commit is contained in:
Max Zwiessele 2014-02-21 12:29:28 +00:00
parent 0dc9a32ba3
commit 8b8ca5544f
5 changed files with 102 additions and 113 deletions

View file

@ -94,9 +94,9 @@ def plot_fit(model, plot_limits=None, which_data_rows='all',
#add error bars for uncertain (if input uncertainty is being modelled)
if hasattr(model,"has_uncertain_inputs"):
ax.errorbar(model.X[which_data, free_dims], model.likelihood.data[which_data, 0],
xerr=2 * np.sqrt(model.X_variance[which_data, free_dims]),
if hasattr(model,"has_uncertain_inputs") and model.has_uncertain_inputs():
ax.errorbar(model.X[which_data_rows, free_dims], model.Y[which_data_rows, 0],
xerr=2 * np.sqrt(model.X_variance[which_data_rows, free_dims]),
ecolor='k', fmt=None, elinewidth=.5, alpha=.5)