From 7dd6e9f910d155608cc12f3970dd8fdff4e94223 Mon Sep 17 00:00:00 2001 From: yahrMason Date: Wed, 10 Jan 2024 19:01:09 -0600 Subject: [PATCH] adding note about coords and loglik --- Rethinking_2/Chp_07.ipynb | 2 +- Rethinking_2/Chp_08.ipynb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Rethinking_2/Chp_07.ipynb b/Rethinking_2/Chp_07.ipynb index e3a499b..34e8830 100644 --- a/Rethinking_2/Chp_07.ipynb +++ b/Rethinking_2/Chp_07.ipynb @@ -1498,7 +1498,7 @@ "source": [ "#### Setup for Code 7.25+\n", "\n", - "Have to reproduce m6.6-m6.8 from Code 6.13-6.17 in Chapter 6" + "Have to reproduce m6.6-m6.8 from Code 6.13-6.17 in Chapter 6. Note that we have to add `idata_kwargs={\"log_likelihood\": True}` in order to have the log-likelihood of every posterior sample added to our inference data. This is necessary to compute the LOO and WAIC metrics. You can read more about it [here](https://www.pymc.io/projects/docs/en/stable/learn/core_notebooks/model_comparison.html#model-log-likelihood)." ] }, { diff --git a/Rethinking_2/Chp_08.ipynb b/Rethinking_2/Chp_08.ipynb index 2a3f9d1..7548c47 100644 --- a/Rethinking_2/Chp_08.ipynb +++ b/Rethinking_2/Chp_08.ipynb @@ -503,6 +503,13 @@ "#### Code 8.8" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In PyMC we can use the `coords` argument when defining our model to add dimensions to the inference data object that is returned with the `pm.sample` method. This is helpful for organizing model parameters. You can read more about coordinates and inference data [here](https://cluhmann.github.io/inferencedata/)." + ] + }, { "cell_type": "code", "execution_count": 12,