Model Comparision Example Attribute error

I ran the Model Comparision Example and found that there is an Attribute error when I run the last input. I checked multiple times.

pm.compareplot(df_comp_LOO);


AttributeError Traceback (most recent call last)
in ()
----> 1 pm.compareplot(df_comp_LOO);

~/anaconda3/lib/python3.6/site-packages/pymc3/plots/compareplot.py in compareplot(comp_df, insample_dev, se, dse, ax, plot_kwargs)
55 yticks_labels[2::2] = comp_df.index[1:]
56 ax.set_yticks(yticks_pos)
—> 57 ax.errorbar(x=comp_df.WAIC[1:],
58 y=yticks_pos[1::2],
59 xerr=comp_df.dSE[1:],

~/anaconda3/lib/python3.6/site-packages/pandas/core/generic.py in getattr(self, name)
3612 if name in self._info_axis:
3613 return self[name]
→ 3614 return object.getattribute(self, name)
3615
3616 def setattr(self, name, value):

AttributeError: ‘DataFrame’ object has no attribute ‘WAIC’

https://github.com/melodramaqueen/pymc3-stuff/blob/master/Model%20comparison.ipynb

What should be done here?
Sampler statistics, Diagnosing Biased Inference with Divergences, Posterior Predictive Checks - works without any problems.

Could you please upgrade pymc3 to master and run the example again? The pm.compareplot is recently updated.

1 Like