arviz_plots.plot_compare#
- arviz_plots.plot_compare(cmp_df, similar_shade=True, relative_scale=False, backend=None, visuals=None, **pc_kwargs)[source]#
Summary plot for model comparison.
Models are compared based on their expected log pointwise predictive density (ELPD).
The ELPD is estimated either by Pareto smoothed importance sampling leave-one-out cross-validation (LOO). Details are presented in [1] and [2].
- Parameters:
- comp_df
pandas.DataFrame
Result of the
arviz_stats.compare
method.- similar_shadebool, optional
If True, a shade is drawn to indicate models with similar predictive performance to the best model. Defaults to True.
- relative_scalebool, optional.
If True scale the ELPD values relative to the best model. Defaults to False.
- backend{“bokeh”, “matplotlib”, “plotly”}
Select plotting backend. Defaults to rcParams[“plot.backend”].
- figsize
tuple
of (float
,float
), optional If None, size is (10, num of models) inches.
- visualsmapping of {
str
mapping orFalse
}, optional Valid keys are:
- **pc_kwargs
Passed to
arviz_plots.PlotCollection
- comp_df
- Returns:
axes
:bokehfigure
,matplotlib
axes
orplotly
figure
See also
arviz_stats.compare
Summary plot for model comparison.
arviz_stats.loo
Compute the ELPD using Pareto smoothed importance sampling Leave-one-out cross-validation method.
References
[1]Vehtari et al. Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing. 27(5) (2017). https://doi.org/10.1007/s11222-016-9696-4. arXiv preprint https://arxiv.org/abs/1507.04544.
[2]Vehtari et al. Pareto Smoothed Importance Sampling. Journal of Machine Learning Research, 25(72) (2024) https://jmlr.org/papers/v25/19-556.html arXiv preprint https://arxiv.org/abs/1507.02646