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

update docstring for loo and waic #2366

Merged
merged 2 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions arviz/stats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,16 +711,19 @@ def loo(data, pointwise=None, var_name=None, reff=None, scale=None):
Returns
-------
ELPDData object (inherits from :class:`pandas.Series`) with the following row/attributes:
elpd: approximated expected log pointwise predictive density (elpd)
elpd_loo: approximated expected log pointwise predictive density (elpd)
se: standard error of the elpd
p_loo: effective number of parameters
shape_warn: bool
True if the estimated shape parameter of Pareto distribution is greater than a thresold
value for one or more samples. For a sample size S, the thresold is compute as
min(1 - 1/log10(S), 0.7)
loo_i: array of pointwise predictive accuracy, only if pointwise True
n_samples: number of samples
n_data_points: number of data points
warning: bool
True if the estimated shape parameter of Pareto distribution is greater than
``good_k``.
loo_i: :class:`~xarray.DataArray` with the pointwise predictive accuracy,
only if pointwise=True
pareto_k: array of Pareto shape values, only if pointwise True
scale: scale of the elpd
good_k: For a sample size S, the thresold is compute as min(1 - 1/log10(S), 0.7)

The returned object has a custom print method that overrides pd.Series method.

Expand Down Expand Up @@ -1580,7 +1583,9 @@ def waic(data, pointwise=None, var_name=None, scale=None, dask_kwargs=None):
elpd_waic: approximated expected log pointwise predictive density (elpd)
se: standard error of the elpd
p_waic: effective number parameters
var_warn: bool
n_samples: number of samples
n_data_points: number of data points
warning: bool
True if posterior variance of the log predictive densities exceeds 0.4
waic_i: :class:`~xarray.DataArray` with the pointwise predictive accuracy,
only if pointwise=True
Expand Down
2 changes: 0 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,6 @@
intersphinx_mapping = {
"xarray": ("https://docs.xarray.dev/en/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
# Oriol: I am lazy and didn't want to update any references we might have using the pymc3 key
"pymc3": ("https://www.pymc.io/projects/docs/en/stable", None),
"pymc": ("https://www.pymc.io/projects/docs/en/stable", None),
"mpl": ("https://matplotlib.org/stable", None),
"bokeh": ("https://docs.bokeh.org/en/latest/", None),
Expand Down