|
4 | 4 | "cell_type": "markdown", |
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | | - "# Analysing variability and compensation mechansims with conditional distributions\n", |
| 7 | + "# Analysing variability and compensation mechanisms with conditional distributions\n", |
8 | 8 | "\n", |
9 | 9 | "A central advantage of `sbi` over parameter search methods such as genetic algorithms is that the posterior captures **all** models that can reproduce experimental data. This allows us to analyse whether parameters can be variable or have to be narrowly tuned, and to analyse compensation mechanisms between different parameters. See also [Marder and Taylor, 2011](https://www.nature.com/articles/nn.2735?page=2) for further motivation to identify all models that capture experimental data.\n", |
10 | 10 | "\n", |
|
15 | 15 | "cell_type": "markdown", |
16 | 16 | "metadata": {}, |
17 | 17 | "source": [ |
18 | | - "Note, you can find the original version of this notebook at [docs/tutorials/05_conditional_distributions.ipynb](https://github.com/sbi-dev/sbi/blob/main/docs/tutorials/05_conditional_distributions.ipynb) in the `sbi` repository.\n" |
| 18 | + "Note, you can find the original version of this notebook at [docs/advanced_tutorials/05_conditional_distributions.ipynb](https://github.com/sbi-dev/sbi/blob/main/docs/advanced_tutorials/05_conditional_distributions.ipynb) in the `sbi` repository.\n" |
19 | 19 | ] |
20 | 20 | }, |
21 | 21 | { |
|
29 | 29 | "cell_type": "markdown", |
30 | 30 | "metadata": {}, |
31 | 31 | "source": [ |
32 | | - "Asssuming you have already obtained `posterior`.\n", |
| 32 | + "Assuming you have already obtained `posterior`.\n", |
33 | 33 | "\n", |
34 | 34 | "```python\n", |
35 | 35 | "from sbi.analysis import conditional_corrcoeff, conditional_pairplot\n", |
|
240 | 240 | "cell_type": "markdown", |
241 | 241 | "metadata": {}, |
242 | 242 | "source": [ |
243 | | - "We can summarize these correlations in a conditional correlation matrix, which computes the Pearson correlation coefficient of each of these pairwise plots. This matrix (below) shows strong correlations between many parameters, which can be interpreted as potential compensation mechansims:\n" |
| 243 | + "We can summarize these correlations in a conditional correlation matrix, which computes the Pearson correlation coefficient of each of these pairwise plots. This matrix (below) shows strong correlations between many parameters, which can be interpreted as potential compensation mechanisms:\n" |
244 | 244 | ] |
245 | 245 | }, |
246 | 246 | { |
|
291 | 291 | "source": [ |
292 | 292 | "## Sampling conditional distributions\n", |
293 | 293 | "\n", |
294 | | - "So far, we have demonstrated how one can plot 2D conditional distributions with `conditional_pairplot()` and how one can compute the pairwise conditional correlation coefficient with `conditional_corrcoeff()`. In some cases, it can be useful to keep a subset of parameters fixed and to vary **more than two** parameters. This can be done by sampling the conditonal posterior $p(\\theta_i | \\theta_{j \\neq i}, x_o)$. As of `sbi` `v0.18.0`, this functionality requires using the [sampler interface](https://sbi.readthedocs.io/en/latest/how_to_guide/09_sampler_interface.html). In this tutorial, we demonstrate this functionality on a linear gaussian simulator with four parameters. We would like to fix the forth parameter to $\\theta_4=0.2$ and sample the first three parameters given that value, i.e. we want to sample $p(\\theta_1, \\theta_2, \\theta_3 | \\theta_4 = 0.2, x_o)$. For an application in neuroscience, see [Deistler, Gonçalves, Macke, 2021](https://www.biorxiv.org/content/10.1101/2021.07.30.454484v4.abstract).\n" |
| 294 | + "So far, we have demonstrated how one can plot 2D conditional distributions with `conditional_pairplot()` and how one can compute the pairwise conditional correlation coefficient with `conditional_corrcoeff()`. In some cases, it can be useful to keep a subset of parameters fixed and to vary **more than two** parameters. This can be done by sampling the conditional posterior $p(\\theta_i | \\theta_{j \\neq i}, x_o)$. As of `sbi` `v0.18.0`, this functionality requires using the [sampler interface](https://sbi.readthedocs.io/en/latest/how_to_guide/09_sampler_interface.html). In this tutorial, we demonstrate this functionality on a linear gaussian simulator with four parameters. We would like to fix the forth parameter to $\\theta_4=0.2$ and sample the first three parameters given that value, i.e. we want to sample $p(\\theta_1, \\theta_2, \\theta_3 | \\theta_4 = 0.2, x_o)$. For an application in neuroscience, see [Deistler, Gonçalves, Macke, 2021](https://www.biorxiv.org/content/10.1101/2021.07.30.454484v4.abstract).\n" |
295 | 295 | ] |
296 | 296 | }, |
297 | 297 | { |
|
0 commit comments