Compare() got an unexpected keyword argument 'var_name'


I’m using Arviz to check the LOO and WAIC of two models. However, when I code something like this: = {“hierarchical”: trace_dag, “pooled”: trace_ppc1}, var_name= [‘pred_col’]),
the error message mentioned in the title will appear. How should I deal with it?

Second, as I checked the source code of arviz.loo and arviz.waic, I found that arviz.loo calculates the elpd_loo, but arviz.waic calculates true WAIC, which is elpd_waic minus variance. Am I right?

Thank you!


For var_name, give it a str not list.

Edit. Could you check what arviz version you have? It could be that the var_name was added recently (not in pypi yet) → install github version

pip install git+

1 Like


Thank you for your reply!

Still the same error message even if I gave it a str.

My version is 0.11.2, and I will try github version!

It works now. Thank you!