Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agsd21 compare1 #2193

Merged
merged 11 commits into from
Feb 1, 2023
Prev Previous commit
Next Next commit
update documentation
  • Loading branch information
asael697 committed Jan 29, 2023
commit 9ccedfd29ba9f46c5c0f39264a42cf4db89048ab
10 changes: 6 additions & 4 deletions arviz/plots/compareplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def plot_compare(
cross-validation (LOO) or using the widely applicable information criterion (WAIC).
We recommend LOO in line with the work presented by [1]_.

This plot is in the style of the one used in the book Statistical Rethinking by
Richard McElreath.Chapter 6 in the first edition or 7 in the second.
This plot is in the style of the one used in [2]_. Chapter 6 in the first edition
or 7 in the second.

Parameters
----------
Expand All @@ -45,8 +45,8 @@ def plot_compare(
plot_ic_diff : bool, default True
Plot standard error of the difference in ELPD between each model
and the top-ranked model.
order_by_rank : bool, optional
If True (default) ensure the best model is used as reference.
order_by_rank : bool, default True
If True ensure the best model is used as reference.
legend : bool, default True
Add legend to figure.
figsize : (float, float), optional
Expand Down Expand Up @@ -89,6 +89,8 @@ def plot_compare(
----------
.. [1] Vehtari et al. (2016). Practical Bayesian model evaluation using leave-one-out
cross-validation and WAIC https://arxiv.org/abs/1507.04544
.. [2] McElreath R. (2022). Statistical Rethinking A Bayesian Course with Examples in
R and Stan, Second edition, CRC Press.

Examples
--------
Expand Down
7 changes: 3 additions & 4 deletions arviz/plots/distcomparisonplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ def plot_dist_comparison(
textsize : float
Text size scaling factor for labels, titles and lines. If `None` it will be
autoscaled based on `figsize`.
var_names : list of str, optional
List of variables to plot. If multiple datasets are supplied and `var_names` is not None,
will print the same set of variables for each dataset. Defaults to `None`, which results in
all the variables being plotted.
var_names : str, list, list of lists, optional
if str, plot the variable. if list, plot all the variables in list
of all groups. if list of lists, plot the vars of groups in respective lists.
coords : dict
Dictionary mapping dimensions to selected coordinates to be plotted.
Dimensions without a mapping specified will include all coordinates for
Expand Down