Skip to content

Commit

Permalink
update admonition boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
drbenvincent committed Aug 31, 2024
1 parent ae6357b commit 2184277
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions examples/generalized_linear_models/GLM-simpsons-paradox.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1380,9 +1380,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
":::{admonition} **Notes**\n",
":class: note\n",
"\n",
":::{note}\n",
"The hierarchical model we are considering contains a simplification in that the population level slope and intercept are assumed to be independent. It is possible to relax this assumption and model any correlation between these parameters by using a multivariate normal distribution.\n",
"\n",
"In one sense this move from Model 2 to Model 3 can be seen as adding parameters, and therefore increasing model complexity. However, in another sense, adding this knowledge about the nested structure of the data actually provides a constraint over parameter space.\n",
Expand Down Expand Up @@ -1742,9 +1740,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
":::{admonition} **Divergences**\n",
":class: note\n",
"\n",
":::{note}\n",
"Note that despite having a longer tune period and increased `target_accept`, this model can still generate a low number of divergent samples. If the reader is interested, you can explore the a \"reparameterisation trick\" is used by setting the flag `non_centered=True`. See the blog post [Why hierarchical models are awesome, tricky, and Bayesian](https://twiecki.io/blog/2017/02/08/bayesian-hierchical-non-centered/) by Thomas Wiecki for more information on this.\n",
":::"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,7 @@ This model could also be called a partial pooling model.

+++

:::{admonition} **Notes**
:class: note

:::{note}
The hierarchical model we are considering contains a simplification in that the population level slope and intercept are assumed to be independent. It is possible to relax this assumption and model any correlation between these parameters by using a multivariate normal distribution.

In one sense this move from Model 2 to Model 3 can be seen as adding parameters, and therefore increasing model complexity. However, in another sense, adding this knowledge about the nested structure of the data actually provides a constraint over parameter space.
Expand Down Expand Up @@ -496,9 +494,7 @@ with hierarchical:
idata = pm.sample(tune=4000, target_accept=0.99, random_seed=rng)
```

:::{admonition} **Divergences**
:class: note

:::{note}
Note that despite having a longer tune period and increased `target_accept`, this model can still generate a low number of divergent samples. If the reader is interested, you can explore the a "reparameterisation trick" is used by setting the flag `non_centered=True`. See the blog post [Why hierarchical models are awesome, tricky, and Bayesian](https://twiecki.io/blog/2017/02/08/bayesian-hierchical-non-centered/) by Thomas Wiecki for more information on this.
:::

Expand Down

0 comments on commit 2184277

Please sign in to comment.