|
7 | 7 | "(sampler_stats)=\n", |
8 | 8 | "# Sampler Statistics\n", |
9 | 9 | "\n", |
10 | | - "When checking for convergence or when debugging a badly behaving\n", |
11 | | - "sampler, it is often helpful to take a closer look at what the\n", |
12 | | - "sampler is doing. For this purpose some samplers export\n", |
13 | | - "statistics for each generated sample.\n", |
14 | | - "\n", |
15 | 10 | ":::{post} May 31, 2022\n", |
16 | | - ":tags: diagnostics \n", |
| 11 | + ":tags: diagnostics\n", |
17 | 12 | ":category: beginner\n", |
18 | 13 | ":author: Meenal Jhajharia, Christian Luhmann\n", |
19 | 14 | ":::" |
|
65 | 60 | "cell_type": "markdown", |
66 | 61 | "metadata": {}, |
67 | 62 | "source": [ |
| 63 | + "When checking for convergence or when debugging a badly behaving sampler, it is often helpful to take a closer look at what the sampler is doing. For this purpose some samplers export statistics for each generated sample.\n", |
| 64 | + "\n", |
68 | 65 | "As a minimal example we sample from a standard normal distribution:" |
69 | 66 | ] |
70 | 67 | }, |
|
151 | 148 | "cell_type": "markdown", |
152 | 149 | "metadata": {}, |
153 | 150 | "source": [ |
154 | | - "- `Note`: NUTS provides the following statistics( these are internal statistics that the sampler uses, you don't need to do anything with them when using PyMC3, to learn more about them, [check this page](https://docs.pymc.io/api/inference.html#module-pymc3.step_methods.hmc.nuts)." |
| 151 | + "- `Note`: NUTS provides the following statistics (these are internal statistics that the sampler uses, you don't need to do anything with them when using PyMC, to learn more about them, {class}`pymc.NUTS`." |
155 | 152 | ] |
156 | 153 | }, |
157 | 154 | { |
|
695 | 692 | "metadata": {}, |
696 | 693 | "source": [ |
697 | 694 | "Some points to `Note`:\n", |
698 | | - "- Some of the sample statistics used by NUTS are renamed when converting to `InferenceData` to follow [ArviZ's naming convention](https://arviz-devs.github.io/arviz/schema/schema.html#sample-stats), while some are specific to PyMC3 and keep their internal PyMC3 name in the resulting InferenceData object.\n", |
| 695 | + "- Some of the sample statistics used by NUTS are renamed when converting to `InferenceData` to follow {ref}`ArviZ's naming convention <arviz:schema>`, while some are specific to PyMC3 and keep their internal PyMC3 name in the resulting InferenceData object.\n", |
699 | 696 | "- `InferenceData` also stores additional info like the date, versions used, sampling time and tuning steps as attributes." |
700 | 697 | ] |
701 | 698 | }, |
|
1746 | 1743 | ");" |
1747 | 1744 | ] |
1748 | 1745 | }, |
| 1746 | + { |
| 1747 | + "cell_type": "markdown", |
| 1748 | + "metadata": {}, |
| 1749 | + "source": [ |
| 1750 | + "## Authors\n", |
| 1751 | + "* Updated by Meenal Jhajharia in April 2021 ([pymc-examples#95](https://github.com/pymc-devs/pymc-examples/pull/95))\n", |
| 1752 | + "* Updated to v4 by Christian Luhmann in May 2022 ([pymc-examples#338](https://github.com/pymc-devs/pymc-examples/pull/338))" |
| 1753 | + ] |
| 1754 | + }, |
| 1755 | + { |
| 1756 | + "cell_type": "markdown", |
| 1757 | + "metadata": {}, |
| 1758 | + "source": [ |
| 1759 | + "## Watermark" |
| 1760 | + ] |
| 1761 | + }, |
1749 | 1762 | { |
1750 | 1763 | "cell_type": "code", |
1751 | 1764 | "execution_count": 16, |
|
1777 | 1790 | "%watermark -n -u -v -iv -w" |
1778 | 1791 | ] |
1779 | 1792 | }, |
1780 | | - { |
1781 | | - "cell_type": "markdown", |
1782 | | - "metadata": {}, |
1783 | | - "source": [ |
1784 | | - "* Updated by Meenal Jhajharia\n", |
1785 | | - "* Updated by Christian Luhmann" |
1786 | | - ] |
1787 | | - }, |
1788 | 1793 | { |
1789 | 1794 | "cell_type": "markdown", |
1790 | 1795 | "metadata": {}, |
|
1813 | 1818 | "name": "python", |
1814 | 1819 | "nbconvert_exporter": "python", |
1815 | 1820 | "pygments_lexer": "ipython3", |
1816 | | - "version": "3.10.4" |
| 1821 | + "version": "3.9.10" |
1817 | 1822 | } |
1818 | 1823 | }, |
1819 | 1824 | "nbformat": 4, |
|
0 commit comments