Introduction#

_images/nilearn-logo.png

These two tutorials will introduce you to the nilearn library to manipulate and process fMRI data, and to scikit-learn to apply machine learning techniques on your data.

It was developed for use at the Montreal AI and Neuroscience (MAIN) educational workshop in November 2021 and December 2022.

Setup#

I know how to use Python, just give me the thing#

You can download the jupyter notebook with the download icon on the top right of each page. Here’s the basic requirements you need to install:

nilearn
matplotlib
seaborn
jupyter-book

I need more step by step help….#

Note

You need to have access to a terminal with Python 3. If you have setup your environment based on instructions of MAIN educational installation guide, you are good to go 🎉

If it not already the case, here is a quick guide to install python 3 on any OS.

  1. Clone/download this repository to your machine and navigate to the directory.

    git clone https://github.com/main-educational/intro_nilearn.git
    cd intro_nilearn
    
  2. We encourage you to use a virtual environment for this tutorial (and for all your projects, that’s a good practice). To do this, run the following command in your terminal, it will create the environment in a folder named env_tuto:

    python3 -m venv env_tuto
    

    Then the following command will activate the environment:

    source env_tuto/bin/activate
    

    Finally, you can install the required libraries:

    pip install -r requirements.txt
    
  3. Navigate to the content of the book:

    cd content/
    

    Now that you are all set, you can run the notebooks with the command:

    jupyter notebook
    

    Click on the .md files. They will be rendered as jupyter notebooks 🎉

Acknowledgements#

This tutorial is presented by Hao-Ting Wang, and Himanshu Aggarwal.

It is rendered here using Jupyter Book,

The content of notebook was iterated based on work from the past presenters: Yasmin Mzayek, François Paugam, Pierre Bellec, Elizabeth DuPre, Greg Kiar, and Jake Vogel.

Past versions of this tutorial: MAIN 2018, Neurohackademy 2020

Introduction to fMRI is taken from: PSY3018 Méthodes en neurosciences cognitives