Code Monkey home page Code Monkey logo

deep-fmri-dataset's Introduction

deep-fMRI-dataset

Code accompanying data release of natural language listening data from 5 fMRI sessions for each of 8 subjects (LeBel et al.) that can be found at openneuro.

To cite:

LeBel, A., Wagner, L., Jain, S. et al. A natural language fMRI dataset for voxelwise encoding models. Sci Data 10, 555 (2023). https://doi.org/10.1038/s41597-023-02437-z

To install the toolbox

To clone and use this dataset:

$ git clone [email protected]:HuthLab/deep-fMRI-dataset.git

then to intialize:

$ cd deep-fMRI-dataset
$ pip install .

Downloading Data

First datalad needs to be installed which can be done with: sudo apt get install datalad

Then, to automatically download the preprocessed data

$ cd encoding
$ python load_dataset.py -download_preprocess

This function will create a data dir if it does not exist and will use datalad to download the preprocessed data as well as feature spaces needed for fitting semantic encoding models. It will download ~20gb of data. Alternately, you can supply a different download location using the --location DATA_DIR flag. If you choose to change the default location of the data, make sure to update the config.py file with the new location.

To download the raw data you can use:

$ datalad clone https://github.com/OpenNeuroDatasets/ds003020.git

$ datalad get ds003020

Fitting Models

The basic functionality for fitting encoding models can be found the script encoding.py, which takes a series of arguments such as subject id, feature space to use, list of training stimuli, etc. It will automatically use the preprocessed data from the location that get_data saves the data to.

To fit a semantic encoding model (eng1000) for one subject (UTS03) and test it on held-out data:

$ python encoding/encoding.py --subject UTS03 --feature eng1000

The other optional parameters that encoding.py takes such as sessions, ndelays, single_alpha allow the user to change the amount of data and regularization aspects of the linear regression used.

This function will then save model performance metrics and model weights as numpy arrays.

Voxelwise Encoding Model Tutorials

For more information about fitting voxelwise encoding models:

  • This repo has a tutorial for fitting semantic encoding models
  • Additionally this repo has a wide selection of tutorials to fit encoding models

deep-fmri-dataset's People

Contributors

alebel14 avatar alexhuth avatar csinva avatar shaileesjain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.