Skip to content

jeffreyallenbrooks/PyMVPAw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

PyMVPAw

Wrappers & additions to PyMVPA

Purpose

These are wrappers and additional methods for PyMVPA as used by our lab. Wrappers reduce various analyses and output to single functions, and provide an assortment of useful tools for managing pymvpa datasets. Additional methods at this point are primarily unique methods of representational similarity analysis. PyMVPAw is an unnecessarily eponymous wrapper for PyMVPA. PyMVPA is a wonderful module for MVPA, multi-variate pattern analysis, of data - especially, in my case, fMRI data. In PyMVPAw, many of PyMVPA's pattern analysis tools are available in single function commands to make the magic of PyMVPA less verbose. For instance, you can run an entire searchlight multiple regression Representational Similarity Analysis with a single line of code:

slRSA_m_nSs( data, target_DM, [control_DM_1 ... control_DM_k] )

It also comes with many additional methods and tools you may find useful:

  • Perform basic MVPA Classification and RSA analyses in single lines of code (within ROIs, searchlights, for single or all subjects)
  • Perform RSA in a multiple regression (controlling for and including additional models), only assessing certain similarity values (of the DM), or compare similarities of specific condition-pairs directly
  • See if between-subject individual differences or trial-by-trial covariates relate to the neural similarity of certain conditions
  • Train your classifier on certain targets, and test on others

Installation

Requirements are:

  1. Download or clone this repository: https://github.com/rystoli/PyMVPAw
  2. Use pip!
pip install [path to PyMVPAw directory]
  1. Import as a whole in Python
from pymvpaw import *

Contents

  • importer.py - imports necessary modules for others to run
  • rsa_pymvpaw.py - our additional RSA methods (eg, do individual differences predict similarity of patterns between two conditions? and more)
  • datamanage.py - etc. functions for handling datasets (e.g., saving, masking, printing attributes to CSV, making ROI masks, and more)
  • searchlight_wraps.py - wrapper functions performing searchlights with various methods (classification, RSA, and our additional RSA methods)
  • roi_wraps.py - wrapper functions performing various methods on specified ROI via ROI mask (classificaiton, RSA, our additional RSA methods)
  • multiple_comparisons_wraps.py - wrapper functions for whole-brain multiple comparison corrections

Use

See:

To-do

  • Redesign group analyses to load data on the fly (to save memory)
  • Create more flexible output from classification
  • Cross-validation for RSA
  • Develop pairsim option into flexible ANOVA w/in and b/w subjects (supplanting behavioralDSM measure)

Thank to Zach Ingbretsen for plenty contribution and help!

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 86.7%
  • Python 13.3%