Skip to content

Commit 40fe04b

Browse files
author
LegrandNico
committed
Update docs to show tutorials in the main page
1 parent d5eed25 commit 40fe04b

12 files changed

+26
-79
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ metadpy first aims to be the Python equivalent of the [hMeta-d toolbox](https://
4040

4141
For an extensive introduction to metadpy, you can navigate the following notebooks that are Python adaptations of the introduction to the [hMeta-d toolbox](https://github.com/metacoglab/HMeta-d) written in Matlab by Olivia Faul for the [Zurich Computational Psychiatry course](https://github.com/metacoglab/HMeta-d/tree/master/CPC_metacog_tutorial).
4242

43-
## Examples
43+
## Examples
4444

4545
| Notebook | Colab | nbViewer |
4646
| --- | ---| --- |

docs/source/examples/1-What metacognition looks like.ipynb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"metadata": {},
66
"source": [
77
"(tutorial_1)=\n",
8-
"Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk> \n",
8+
"# What metacognition looks like?\n",
9+
"Author: Nicolas Legrand <nicolas.legrand@cas.au.dk> \n",
910
"Adapted from the tutorial proposed by the HMeta-d toolbox: https://github.com/metacoglab/HMeta-d/tree/master/CPC_metacog_tutorial"
1011
]
1112
},
@@ -23,13 +24,6 @@
2324
"sns.set_context(\"talk\")"
2425
]
2526
},
26-
{
27-
"cell_type": "markdown",
28-
"metadata": {},
29-
"source": [
30-
"# What metacognition looks like?"
31-
]
32-
},
3327
{
3428
"cell_type": "markdown",
3529
"metadata": {},

docs/source/examples/1-What metacognition looks like.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ kernelspec:
1313
---
1414

1515
(tutorial_1)=
16-
Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk>
16+
# What metacognition looks like?
17+
Author: Nicolas Legrand <nicolas.legrand@cas.au.dk>
1718
Adapted from the tutorial proposed by the HMeta-d toolbox: https://github.com/metacoglab/HMeta-d/tree/master/CPC_metacog_tutorial
1819

1920
```{code-cell} ipython3
@@ -25,10 +26,6 @@ from metadpy.utils import type2_SDT_simuation
2526
sns.set_context("talk")
2627
```
2728

28-
# What metacognition looks like?
29-
30-
+++
31-
3229
## Simulating ratings
3330

3431
+++

docs/source/examples/2-Fitting the model-MLE.ipynb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"(tutorial_2)= \n",
7+
"(tutorial_2)=\n",
8+
"# Fitting the model\n",
89
"Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk> \n",
910
"Adapted from the tutorial proposed by the HMeta-d toolbox: https://github.com/metacoglab/HMeta-d/tree/master/CPC_metacog_tutorial"
1011
]
@@ -28,13 +29,6 @@
2829
"sns.set_context(\"talk\")"
2930
]
3031
},
31-
{
32-
"cell_type": "markdown",
33-
"metadata": {},
34-
"source": [
35-
"# Fitting the model"
36-
]
37-
},
3832
{
3933
"cell_type": "markdown",
4034
"metadata": {},

docs/source/examples/2-Fitting the model-MLE.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ kernelspec:
1212
name: python3
1313
---
1414

15-
(tutorial_2)=
15+
(tutorial_2)=
16+
# Fitting the model
1617
Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk>
1718
Adapted from the tutorial proposed by the HMeta-d toolbox: https://github.com/metacoglab/HMeta-d/tree/master/CPC_metacog_tutorial
1819

@@ -30,10 +31,6 @@ from metadpy.utils import (responseSimulation, trials2counts,
3031
sns.set_context("talk")
3132
```
3233

33-
# Fitting the model
34-
35-
+++
36-
3734
## Calculating metacognition: the type-2 ROC curve
3835

3936
+++

docs/source/examples/3-Comparison with the hmeta-d toolbox.ipynb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
},
88
"source": [
99
"(tutorial_3)=\n",
10+
"# Single subject\n",
1011
"Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk> \n",
1112
"Adapted from the tutorial proposed by the HMeta-d toolbox: https://github.com/metacoglab/HMeta-d/tree/master/CPC_metacog_tutorial"
1213
]
@@ -29,15 +30,6 @@
2930
"sns.set_context(\"talk\")"
3031
]
3132
},
32-
{
33-
"cell_type": "markdown",
34-
"metadata": {
35-
"id": "rsAIxeFyWijX"
36-
},
37-
"source": [
38-
"# Single subject"
39-
]
40-
},
4133
{
4234
"cell_type": "code",
4335
"execution_count": 2,

docs/source/examples/3-Comparison with the hmeta-d toolbox.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ kernelspec:
1515
+++ {"id": "a3o1EnPLWeAv"}
1616

1717
(tutorial_3)=
18+
# Single subject
1819
Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk>
1920
Adapted from the tutorial proposed by the HMeta-d toolbox: https://github.com/metacoglab/HMeta-d/tree/master/CPC_metacog_tutorial
2021

@@ -31,10 +32,6 @@ from metadpy.bayesian import hmetad
3132
sns.set_context("talk")
3233
```
3334

34-
+++ {"id": "rsAIxeFyWijX"}
35-
36-
# Single subject
37-
3835
```{code-cell} ipython3
3936
:id: v8xhAXePWm2Y
4037

docs/source/examples/Example 1 - Fitting MLE - Subject and group level.ipynb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
},
99
"source": [
1010
"(example_1)=\n",
11+
"# Fitting at the subject level\n",
1112
"Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk>"
1213
]
1314
},
@@ -42,16 +43,6 @@
4243
"We are going to see, however, that [metadpy](https://github.com/LegrandNico/metadpy) greatly simplifies the preprocessing of raw data, letting the user fit the model for many participants/groups/conditions from the results data frame in a single command call. Another advantage here is that the python code supporting the model fitting is optimized using [Numba](http://numba.pydata.org/), which greatly improves its performance."
4344
]
4445
},
45-
{
46-
"cell_type": "markdown",
47-
"id": "unable-tattoo",
48-
"metadata": {
49-
"id": "unable-tattoo"
50-
},
51-
"source": [
52-
"# Fitting at the subject level"
53-
]
54-
},
5546
{
5647
"cell_type": "markdown",
5748
"id": "current-valuation",
@@ -632,7 +623,7 @@
632623
"id": "379347c1",
633624
"metadata": {},
634625
"source": [
635-
"# Watermark"
626+
"## Watermark"
636627
]
637628
},
638629
{

docs/source/examples/Example 1 - Fitting MLE - Subject and group level.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ kernelspec:
1515
+++ {"id": "copyrighted-border"}
1616

1717
(example_1)=
18+
# Fitting at the subject level
1819
Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk>
1920

2021
```{code-cell} ipython3
@@ -36,10 +37,6 @@ In this notebook, we are going to estimate meta-*d'* using Maximum Likelihood Es
3637

3738
We are going to see, however, that [metadpy](https://github.com/LegrandNico/metadpy) greatly simplifies the preprocessing of raw data, letting the user fit the model for many participants/groups/conditions from the results data frame in a single command call. Another advantage here is that the python code supporting the model fitting is optimized using [Numba](http://numba.pydata.org/), which greatly improves its performance.
3839

39-
+++ {"id": "unable-tattoo"}
40-
41-
# Fitting at the subject level
42-
4340
+++ {"id": "current-valuation"}
4441

4542
## From response-signal arrays
@@ -207,7 +204,7 @@ plt.tight_layout()
207204
sns.despine()
208205
```
209206

210-
# Watermark
207+
## Watermark
211208

212209
```{code-cell} ipython3
213210
%load_ext watermark

docs/source/examples/Example 2 - Fitting Bayesian - Subject level (pymc).ipynb

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"id": "regulated-swiss"
88
},
99
"source": [
10-
"(example_2)= \n",
10+
"(example_2)=\n",
11+
"# Fitting data at the subject level\n",
1112
"Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk>"
1213
]
1314
},
@@ -25,16 +26,6 @@
2526
"from metadpy.bayesian import hmetad"
2627
]
2728
},
28-
{
29-
"cell_type": "markdown",
30-
"id": "fewer-sister",
31-
"metadata": {
32-
"id": "fewer-sister"
33-
},
34-
"source": [
35-
"# Fitting data at the subject level"
36-
]
37-
},
3829
{
3930
"cell_type": "markdown",
4031
"id": "operating-aerospace",
@@ -381,7 +372,7 @@
381372
"id": "f1714be8",
382373
"metadata": {},
383374
"source": [
384-
"# Watermark"
375+
"## Watermark"
385376
]
386377
},
387378
{

0 commit comments

Comments
 (0)