Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rapid Cortical Mapping

This repository contains code used in the paper "Rapid cortical mapping with cross-participant encoding models" by Jerry Tang and Alexander G. Huth.

Usage

  1. Install dependencies
conda create -n rcm python=3.12.12
pip install numpy==1.26.4 scipy==1.16.3 pycortex==1.2.11 tables==3.10.2
  1. Download data into new data/ directory.

  2. Download features into new feature/ directory. The cross-participant modeling approach is agnostic to the specific feature space so custom features extracted from the story stimuli should be stored here as well.

  3. Download fMRI data into new mri/ directory. Instructions for downloading the fMRI data from Tang and Huth 2026 are provided in the demo.

  4. The train_reference function trains a reference encoding model. The key parameter determines where the model is saved. The references parameter determines the reference participants used to train the model. The feature parameter determines the feature space used to train the model. The stimuli parameter determines the stimuli used to train the model. The em_alpha and cm_alpha parameters determine the L2 regularization constants used to estimate encoding models and cross-participant converters for the given feature space. The L2 regularization constants are optimized using the reference participant data if arguments are not provided.

  5. The train_cross function transfers a reference encoding model to a new goal participant. The key parameter determines which reference encoding model to use. The goal parameter determines the goal participant. The stimuli parameter determines the stimuli used to perform functional alignment.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages