tensor-fmri
Using tensor-based approaches to classify fMRI data from StarPLUS.
Citation
If you use any code in this repository, please cite the following work.
Here is where we will add the citation to the paper.
Installation and Requirements
git clone https://github.com/elizabethnewman/tensor-fmri.git
cd tensor-fmri
pip install -r requirements.txt
Additional Requirements: python version 3.7 or newer
Additional Advice: before installing the requirements, create a virtual environment via
virtualenv -p python3 <env_name>
To use the environment, activate via
source env_name/bin/activate
pip install -r requirements.txt
When finished, deactivate while in the virtual environment via
deactivate
StarPlus Data
The StarPlus fMRI dataset is publicly-available and fairly small. This dataset consists of fMRIs of study subjects who are shown either a sentence or an image, and we aim to classify them into these two categories. We represent the data in a fifth order tensor containing pixel data of the 3D brain images over time over each trial.
Download from the website to the data folder before running StarPlus scripts.
Organization
-
data: contains two datasets, the toy synthetic dataset and the MNIST datasets.
-
tensor: contains functions for all the needed tensor products and tensor SVD. This is the core of the repository and is written for general use, not just for fMRI data.
-
tests: contains internal code to test the tensor-tensor products and can be used in the development of new code.
-
utils: contains visualization and preprocessing tools.
Introductary Notebooks in Google Colab
To illustrate the utility of the code and our algorithm, we have create two Google Colab notebooks.
Resources
-
Newman, Kilmer, and Horesh. Image classification using local tensor singular value decompositions, IEEE CAMSAP, 2017.
-
Kernfeld, Kilmer, and Aeron. Tensor-tensor products with invertible linear transforms. Linear Algebra and its Applications, 485 (11), 2015.
-
Kilmer, Horesh, Avron, and Newman Tensor-tensor algebra for optimal representation and compression of multiway data. PNAS, 28 (118), 2021.