Skip to content

Commit

Permalink
update docstring for loo and waic (#2366)
Browse files Browse the repository at this point in the history
* update docstring for loo and waic

* Update conf.py

---------

Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com>
  • Loading branch information
aloctavodia and OriolAbril authored Aug 10, 2024
1 parent 17a35f7 commit e6b5e2b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
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

0 comments on commit e6b5e2b

Please sign in to comment.