From 66e01e230af176438c1b5347843c330831ed74c5 Mon Sep 17 00:00:00 2001 From: Nicolas Legrand Date: Thu, 28 Sep 2023 11:16:02 +0200 Subject: [PATCH] small fixes in the documentation (#111) * fix error in equation in the exercise * remove unecessary config from docs setup.py --- docs/source/_static/style.css | 44 ------------------- docs/source/conf.py | 6 --- .../notebooks/Exercise_1_Using_the_HGF.ipynb | 4 +- .../notebooks/Exercise_1_Using_the_HGF.md | 4 +- 4 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 docs/source/_static/style.css diff --git a/docs/source/_static/style.css b/docs/source/_static/style.css deleted file mode 100644 index ed391c00e..000000000 --- a/docs/source/_static/style.css +++ /dev/null @@ -1,44 +0,0 @@ -/* --- Badges for categorizing release notes from Seaborn --- */ - -.label, -.badge { - display: inline-block; - padding: 2px 4px; - font-size: 11.844px; - /* font-weight: bold; */ - line-height: 13px; - color: #ffffff; - vertical-align: baseline; - white-space: nowrap; - /* text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); */ - background-color: #999999; -} -.badge { - padding-left: 9px; - padding-right: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; - opacity: 70%; -} -.badge-api { - background-color: #c44e52; -} -.badge-defaults { - background-color: #dd8452; -} -.badge-docs { - background-color: #8172b3; -} -.badge-feature { - background-color: #55a868; -} -.badge-enhancement { - background-color: #4c72b0; -} -.badge-fix { - background-color: #ccb974; -} -.badge-build { - background-color: #937860; -} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index beba7ba23..921086940 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -72,9 +72,6 @@ # The master toctree document. master_doc = "index" -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. @@ -120,9 +117,6 @@ "changelog": [], } -def setup(app): - app.add_css_file('style.css') - # -- Intersphinx ------------------------------------------------ intersphinx_mapping = { diff --git a/docs/source/notebooks/Exercise_1_Using_the_HGF.ipynb b/docs/source/notebooks/Exercise_1_Using_the_HGF.ipynb index 392e0b656..8a5ec8e46 100644 --- a/docs/source/notebooks/Exercise_1_Using_the_HGF.ipynb +++ b/docs/source/notebooks/Exercise_1_Using_the_HGF.ipynb @@ -127,11 +127,11 @@ "\n", "The HGF hierarchically generalize this process by making the parameters of a stochastic process depend on another GRW at a different level. In [PyHGF](https://github.com/ilabcode/pyhgf) we use a *nodalized* version of this framework {cite:p}`weber:2023`, and consider that each stochastic process is a node in a network, connected with other nodes through probabilistic dependencies: **value coupling** (targetting the value $\\mu$ of the child node) or **volatility coupling** (targetting the volatility $\\sigma^2$ of the child node).\n", "\n", - "Let's consider for example a network constituted of two nodes $x_1$ and $x_2$, as it is found in the continuous HGF {cite:p}`2014:mathys`. The node $x_1$ is performing a GRW as previously described. We can add a dependency on the mean of the distribution (**value coupling**) by assuming that $x_1$ inherits this value directly from $x_2$, instead of using its own previous value. Mathematically, this would write:\n", + "Let's consider for example a network constituted of two nodes $x_1$ and $x_2$, as it is found in the continuous HGF {cite:p}`2014:mathys`. The node $x_1$ is performing a GRW as previously described. We can add a dependency on the mean of the distribution (**value coupling**) by assuming that $x_1$ inherits the difference step from $x_2$, instead of using only its own previous value. Mathematically, this would write:\n", "\n", "$$\n", "x_2^{(k)} \\sim \\mathcal{N}(x_2^{(k-1)}, \\, \\sigma_2^2) \\\\\n", - "x_1^{(k)} \\sim \\mathcal{N}(x_2^{(k)}, \\, \\sigma_1^2) \\\\\n", + "x_1^{(k)} \\sim \\mathcal{N}(x_1^{(k-1)} + \\alpha_{1} x_2^{(k)}, \\, \\sigma_1^2) \\\\\n", "$$\n", "\n", "Note that this generative process reads top-down: the node higher in the hierarchy ($x_2$) generates new values and passes them to the child nodes.\n", diff --git a/docs/source/notebooks/Exercise_1_Using_the_HGF.md b/docs/source/notebooks/Exercise_1_Using_the_HGF.md index 8bbbb2adc..fc9711686 100644 --- a/docs/source/notebooks/Exercise_1_Using_the_HGF.md +++ b/docs/source/notebooks/Exercise_1_Using_the_HGF.md @@ -87,11 +87,11 @@ We have simulated above a simple GRW. At each time point, this process is fully The HGF hierarchically generalize this process by making the parameters of a stochastic process depend on another GRW at a different level. In [PyHGF](https://github.com/ilabcode/pyhgf) we use a *nodalized* version of this framework {cite:p}`weber:2023`, and consider that each stochastic process is a node in a network, connected with other nodes through probabilistic dependencies: **value coupling** (targetting the value $\mu$ of the child node) or **volatility coupling** (targetting the volatility $\sigma^2$ of the child node). -Let's consider for example a network constituted of two nodes $x_1$ and $x_2$, as it is found in the continuous HGF {cite:p}`2014:mathys`. The node $x_1$ is performing a GRW as previously described. We can add a dependency on the mean of the distribution (**value coupling**) by assuming that $x_1$ inherits this value directly from $x_2$, instead of using its own previous value. Mathematically, this would write: +Let's consider for example a network constituted of two nodes $x_1$ and $x_2$, as it is found in the continuous HGF {cite:p}`2014:mathys`. The node $x_1$ is performing a GRW as previously described. We can add a dependency on the mean of the distribution (**value coupling**) by assuming that $x_1$ inherits the difference step from $x_2$, instead of using only its own previous value. Mathematically, this would write: $$ x_2^{(k)} \sim \mathcal{N}(x_2^{(k-1)}, \, \sigma_2^2) \\ -x_1^{(k)} \sim \mathcal{N}(x_2^{(k)}, \, \sigma_1^2) \\ +x_1^{(k)} \sim \mathcal{N}(x_1^{(k-1)} + \alpha_{1} x_2^{(k)}, \, \sigma_1^2) \\ $$ Note that this generative process reads top-down: the node higher in the hierarchy ($x_2$) generates new values and passes them to the child nodes.