Compare model with WAIC

I was trying to do something like the example from the documentation (https://docs.pymc.io/notebooks/model_comparison.html?highlight=compare)

df_comp_WAIC = pm.compare({hierarchical: trace_h, pooled: trace_p})

but I got error message

compare() missing 1 required positional argument: ‘models’

Did I miss something?
Thanks a lot

The docstring is displaying the master branch - the syntax for pm.compare is recently change.
Could you please try update to master?

What’s the solution ? I am still getting an error.

I am not sure how you install PyMC3, usually to install from master branch you do:

pip install git+https://github.com/pymc-devs/pymc3
1 Like

It’s still not working. I have two installations - one with virtual env on my own laptop (where I installed with pip) and the other with anaconda in a server. I tried both.

Use pip install git+https://github.com/pymc-devs/pymc3 --upgrade.

1 Like