Skip to content

Commit 56c6141

Browse files
authored
Merge pull request #41 from mvdoc/mnt/order
MNT Reorder notebooks and improve naming
2 parents 93e4c87 + 66c52ae commit 56c6141

17 files changed

Lines changed: 93 additions & 95 deletions

README.rst

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
1-
============================
2-
Voxelwise modeling tutorials
3-
============================
1+
==================================
2+
Voxelwise Encoding Model tutorials
3+
==================================
44

55
|Github| |Python| |License| |Build| |Build Tutorials| |Downloads|
66

7-
Welcome to the voxelwise modeling tutorial from the
8-
`GallantLab <https://gallantlab.org>`_.
7+
Welcome to the Voxelwise Encoding Model tutorials, brought to you by the
8+
`Gallant Lab <https://gallantlab.org>`_.
99

1010
Paper
1111
=====
1212

1313
If you use these tutorials for your work, consider citing the corresponding paper:
1414

15-
Dupré La Tour, T., Visconti di Oleggio Castello, M., & Gallant, J. L. (2024). The Voxelwise Modeling framework: a tutorial introduction to fitting encoding models to fMRI data. https://doi.org/10.31234/osf.io/t975e
15+
Dupré La Tour, T., Visconti di Oleggio Castello, M., & Gallant, J. L. (2024). The Voxelwise Encoding Model framework: a tutorial introduction to fitting encoding models to fMRI data. https://doi.org/10.31234/osf.io/t975e
1616

1717
You can find a copy of the paper `here <paper/voxelwise_tutorials_paper.pdf>`_.
1818

1919
Tutorials
2020
=========
2121

22-
This repository contains tutorials describing how to use the voxelwise modeling
23-
framework. `Voxelwise modeling
24-
<https://gallantlab.github.io/voxelwise_tutorials/voxelwise_modeling.html>`_ is
22+
This repository contains tutorials describing how to use the Voxelwise Encoding Model
23+
(VEM) framework. `VEM
24+
<https://gallantlab.github.io/voxelwise_tutorials/pages/voxelwise_modeling.html>`_ is
2525
a framework to perform functional magnetic resonance imaging (fMRI) data
2626
analysis, fitting encoding models at the voxel level.
2727

2828
To explore these tutorials, one can:
2929

30-
- read the rendered examples in the tutorials
31-
`website <https://gallantlab.github.io/voxelwise_tutorials/>`_ (recommended)
32-
- run the merged notebook in
30+
- Read the rendered examples in the tutorials
31+
`website <https://gallantlab.github.io/voxelwise_tutorials/>`_ (recommended).
32+
- Run the merged notebook in
3333
`Colab <https://colab.research.google.com/github/gallantlab/voxelwise_tutorials/blob/main/tutorials/notebooks/shortclips/merged_for_colab.ipynb>`_.
34-
- run the Jupyter notebooks (`tutorials/notebooks <tutorials/notebooks>`_ directory) locally
34+
- Run the Jupyter notebooks (`tutorials/notebooks <tutorials/notebooks>`_ directory) locally.
35+
36+
The tutorials are best explored in order, starting with the "shortclips"
37+
tutorial. The "vim2" tutorial is optional and redundant with the "shortclips" one.
3538

36-
The tutorials are best explored in order, starting with the "Shortclips"
37-
tutorial.
3839

3940
Dockerfiles
4041
===========
42+
4143
This repository contains Dockerfiles to run the tutorials locally. Please see the
4244
instructions in the `docker <docker>`_ directory.
4345

tutorials/Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ NBDIR = notebooks/shortclips
2222

2323
merge-notebooks:
2424
python merge_notebooks.py \
25-
$(NBDIR)/00_setup_colab.ipynb \
26-
$(NBDIR)/01_plot_explainable_variance.ipynb \
27-
$(NBDIR)/02_plot_ridge_regression.ipynb \
28-
$(NBDIR)/03_plot_wordnet_model.ipynb \
29-
$(NBDIR)/04_plot_hemodynamic_response.ipynb \
30-
$(NBDIR)/05_plot_motion_energy_model.ipynb \
31-
$(NBDIR)/06_plot_banded_ridge_model.ipynb \
25+
$(NBDIR)/01_setup_colab.ipynb \
26+
$(NBDIR)/03_compute_explainable_variance.ipynb \
27+
$(NBDIR)/04_understand_ridge_regression.ipynb \
28+
$(NBDIR)/05_fit_wordnet_model.ipynb \
29+
$(NBDIR)/06_visualize_hemodynamic_response.ipynb \
30+
$(NBDIR)/08_fit_motion_energy_model.ipynb \
31+
$(NBDIR)/09_fit_banded_ridge_model.ipynb \
3232
> $(NBDIR)/merged_for_colab.ipynb
3333
echo "Saved in $(NBDIR)/merged_for_colab.ipynb"
3434

3535
python merge_notebooks.py \
36-
$(NBDIR)/00_setup_colab.ipynb \
37-
$(NBDIR)/01_plot_explainable_variance.ipynb \
38-
$(NBDIR)/03_plot_wordnet_model.ipynb \
39-
$(NBDIR)/05_plot_motion_energy_model.ipynb \
40-
$(NBDIR)/06_plot_banded_ridge_model.ipynb \
36+
$(NBDIR)/01_setup_colab.ipynb \
37+
$(NBDIR)/03_compute_explainable_variance.ipynb \
38+
$(NBDIR)/05_fit_wordnet_model.ipynb \
39+
$(NBDIR)/08_fit_motion_energy_model.ipynb \
40+
$(NBDIR)/09_fit_banded_ridge_model.ipynb \
4141
> $(NBDIR)/merged_for_colab_model_fitting.ipynb
4242
echo "Saved in $(NBDIR)/merged_for_colab_model_fitting.ipynb"
4343

tutorials/_toc.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ sections:
99
- file: notebooks/shortclips/README
1010
title: Shortclips tutorial
1111
sections:
12-
- file: notebooks/shortclips/00_download_shortclips
13-
- file: notebooks/shortclips/01_plot_explainable_variance
14-
- file: notebooks/shortclips/02_plot_ridge_regression
15-
- file: notebooks/shortclips/03_plot_wordnet_model
16-
- file: notebooks/shortclips/04_plot_hemodynamic_response
17-
- file: notebooks/shortclips/05_plot_motion_energy_model
18-
- file: notebooks/shortclips/06_plot_banded_ridge_model
12+
- file: notebooks/shortclips/02_download_shortclips
13+
- file: notebooks/shortclips/03_compute_explainable_variance
14+
- file: notebooks/shortclips/04_understand_ridge_regression
15+
- file: notebooks/shortclips/05_fit_wordnet_model
16+
- file: notebooks/shortclips/06_visualize_hemodynamic_response
1917
- file: notebooks/shortclips/07_extract_motion_energy
18+
- file: notebooks/shortclips/08_fit_motion_energy_model
19+
- file: notebooks/shortclips/09_fit_banded_ridge_model
2020
- file: notebooks/vim2/README
2121
title: Vim-2 tutorial (optional)
2222
sections:

tutorials/notebooks/shortclips/00_setup_colab.ipynb renamed to tutorials/notebooks/shortclips/01_setup_colab.ipynb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
"# Setup Google Colab\n",
99
"\n",
1010
"In this script, we setup a Google Colab environment. This script will only work\n",
11-
"when run from [Google Colab](https://colab.research.google.com/)). You can\n",
12-
"skip it if you run the tutorials on your machine.\n"
11+
"when run from [Google Colab](https://colab.research.google.com/). You can\n",
12+
"skip it if you run the tutorials on your machine.\n",
13+
"\n",
14+
"> **Note:** This script will install all the required dependencies and download the data.\n",
15+
"> It will take around 10 minutes to run, but you need to run it only once in your Colab session.\n",
16+
"> If your Colab session is disconnected, you will need to run this script again."
1317
]
1418
},
1519
{
@@ -22,15 +26,15 @@
2226
"In Google Colab you can request access to a GPU by changing the runtime type.\n",
2327
"To do so, click the following menu options in Google Colab:\n",
2428
"\n",
25-
"(Menu) \"Runtime\" -> \"Change runtime type\" -> \"Hardware accelerator\" -> \"GPU\".\n",
29+
"> (Menu) \"Runtime\" -> \"Change runtime type\" -> \"Hardware accelerator\" -> \"GPU\".\n",
2630
"\n"
2731
]
2832
},
2933
{
3034
"cell_type": "markdown",
3135
"metadata": {},
3236
"source": [
33-
"## Download the data and install all required dependencies\n",
37+
"## Install all required dependencies and download the data\n",
3438
"\n",
3539
"Uncomment and run the following cell to download the required packages.\n",
3640
"\n"

tutorials/notebooks/shortclips/00_download_shortclips.ipynb renamed to tutorials/notebooks/shortclips/02_download_shortclips.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@
5151
"download more subjects.\n",
5252
"\n",
5353
"We also skip the stimuli files, since the dataset provides two preprocessed\n",
54-
"feature spaces to perform voxelwise modeling without requiring the original\n",
55-
"stimuli.\n",
56-
"\n"
54+
"feature spaces to fit voxelwise encoding models without requiring the original\n",
55+
"stimuli."
5756
]
5857
},
5958
{

tutorials/notebooks/shortclips/01_plot_explainable_variance.ipynb renamed to tutorials/notebooks/shortclips/03_compute_explainable_variance.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
"stimulus-dependent signal and noise. If we present the same stimulus multiple\n",
1616
"times and we record brain activity for each repetition, the stimulus-dependent\n",
1717
"signal will be the same across repetitions while the noise will vary across\n",
18-
"repetitions. In voxelwise modeling, the features used to model brain activity\n",
19-
"are the same for each repetition of the stimulus. Thus, encoding models will\n",
20-
"predict only the repeatable stimulus-dependent signal.\n",
18+
"repetitions. In the Voxelwise Encoding Model framework, \n",
19+
"the features used to model brain activity are the same for each repetition of the \n",
20+
"stimulus. Thus, encoding models will predict only the repeatable stimulus-dependent \n",
21+
"signal.\n",
2122
"\n",
2223
"The stimulus-dependent signal can be estimated by taking the mean of brain\n",
2324
"responses over repeats of the same stimulus or experiment. The variance of the\n",

tutorials/notebooks/shortclips/02_plot_ridge_regression.ipynb renamed to tutorials/notebooks/shortclips/04_understand_ridge_regression.ipynb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"Linear regression is a method to model the relation between some input\n",
1616
"variables $X \\in \\mathbb{R}^{(n \\times p)}$ (the features) and an output\n",
1717
"variable $y \\in \\mathbb{R}^{n}$ (the target). Specifically, linear\n",
18-
"regression uses a vector of coefficient $w \\in \\mathbb{R}^{p}$` to\n",
18+
"regression uses a vector of coefficient $w \\in \\mathbb{R}^{p}$ to\n",
1919
"predict the output\n",
2020
"\n",
2121
"\\begin{align}\\hat{y} = Xw\\end{align}\n",
@@ -30,15 +30,6 @@
3030
"least squares* (OLS).\n"
3131
]
3232
},
33-
{
34-
"cell_type": "code",
35-
"execution_count": null,
36-
"metadata": {
37-
"collapsed": false
38-
},
39-
"outputs": [],
40-
"source": []
41-
},
4233
{
4334
"cell_type": "markdown",
4435
"metadata": {},

tutorials/notebooks/shortclips/03_plot_wordnet_model.ipynb renamed to tutorials/notebooks/shortclips/05_fit_wordnet_model.ipynb

File renamed without changes.

tutorials/notebooks/shortclips/04_plot_hemodynamic_response.ipynb renamed to tutorials/notebooks/shortclips/06_visualize_hemodynamic_response.ipynb

File renamed without changes.

tutorials/notebooks/shortclips/05_plot_motion_energy_model.ipynb renamed to tutorials/notebooks/shortclips/08_fit_motion_energy_model.ipynb

File renamed without changes.

0 commit comments

Comments
 (0)