From d95e9763b19611fcdeefa7b9aecb2746d5534fc9 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Tue, 23 Feb 2021 21:25:15 +0200 Subject: [PATCH] update changelog and docstring --- CHANGELOG.md | 1 + arviz/data/io_cmdstanpy.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92f2a0af0c..f1a5e4fb2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Added `arviz.labels` module with classes and utilities ([1201](https://github.com/arviz-devs/arviz/pull/1201)) * Added probability estimate within ROPE in `plot_posterior` ([1570](https://github.com/arviz-devs/arviz/pull/1570)) * Added `rope_color` and `ref_val_color` arguments to `plot_posterior` ([1570](https://github.com/arviz-devs/arviz/pull/1570)) +* Improved retrieving or pointwise log likelihood in `from_cmdstanpy` ([1579](https://github.com/arviz-devs/arviz/pull/1579)) ### Maintenance and fixes * Enforced using coordinate values as default labels ([1201](https://github.com/arviz-devs/arviz/pull/1201)) diff --git a/arviz/data/io_cmdstanpy.py b/arviz/data/io_cmdstanpy.py index 3d7a0f7356..594e72935f 100644 --- a/arviz/data/io_cmdstanpy.py +++ b/arviz/data/io_cmdstanpy.py @@ -727,7 +727,11 @@ def from_cmdstanpy( predictions_constant_data : dict Constant data for predictions used in the sampling. log_likelihood : str, list of str, dict of {str: str} - Pointwise log_likelihood for the data. + Pointwise log_likelihood for the data. If a dict, its keys should represent var_names + from the corresponding observed data and its values the stan variable where the + data is stored. By default, if a variable ``log_lik`` is present in the Stan model, + it will be retrieved as pointwise log likelihood values. Use ``False`` to avoid this + behaviour. index_origin : int, optional Starting value of integer coordinate values. Defaults to the value in rcParam ``data.index_origin``.