PyMVPA: a Python Toolbox for Multivariate Pattern Analysis of fMRI Data
Open accessThe DOI matches its Crossref record; 37 of the 37 references it cites were found in a registry or an index.
Abstract
Decoding patterns of neural activity onto cognitive states is one of the central goals of functional brain imaging. Standard univariate fMRI analysis methods, which correlate cognitive and perceptual function with the blood oxygenation-level dependent (BOLD) signal, have proven successful in identifying anatomical regions based on signal increases during cognitive and perceptual tasks. Recently, researchers have begun to explore new multivariate techniques that have proven to be more flexible, more reliable, and more sensitive than standard univariate analysis. Drawing on the field of statistical learning theory, these new classifier-based analysis techniques possess explanatory power that could provide new insights into the functional properties of the brain. However, unlike the wealth of software packages for univariate analyses, there are few packages that facilitate multivariate pattern classification analyses of fMRI data. Here we introduce a Python-based, cross-platform, and open-source software toolbox, called PyMVPA, for the application of classifier-based analysis techniques to fMRI datasets. PyMVPA makes use of Python’s ability to access libraries written in a large variety of programming languages and computing environments to interface with the wealth of existing machine learning packages. We present the framework in this paper and provide illustrative examples on its usage, features, and programmability.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
LIBSVM: A library for support vector machines
Chang, C.-C., & Lin, C.-J. (2011) · ACM Transactions on Intelligent Systems and Technology · doi:10.1145/1961189.1961199 · Cited by 40,918
An Introduction to the Bootstrap
Efron, B., & Tibshirani, R. J. (1994) · doi:10.1201/9780429246593 · Cited by 40,500
The Nature of Statistical Learning Theory
Vapnik, V. N. (1995) · doi:10.1007/978-1-4757-2440-0 · Cited by 39,138
An Introduction to the Bootstrap
Efron, B., & Tibshirani, R. J. (1993) · doi:10.1007/978-1-4899-4541-9 · Cited by 21,230
Jenkinson, M., Bannister, P., Brady, M., & Smith, S. (2002) · NeuroImage · doi:10.1006/nimg.2002.1132 · Cited by 11,888
Libsvm : A library for support vector machines
Ferrari, V. (2008) · Medical Entomology and Zoology · Cited by 10,123
Gene selection for cancer classification using support vector machines
Guyon, I., Weston, J., Barnhill, S., & Vapnik, V. (2002) · Machine Learning · doi:10.1023/a:1012487302797 · Cited by 9,954
Efron, B., Hastie, T., Johnstone, I., & Tibshirani, R. (2004) · The Annals of Statistics · doi:10.1214/009053604000000067 · Cited by 9,357
An Introduction to Variable and Feature Selection.
Guyon, I., & Elisseeff, A. (2003) · Cited by 6,576
Nonparametric permutation tests for functional neuroimaging: A primer with examples
Nichols, T. E., & Holmes, A. P. (2002) · Human Brain Mapping · doi:10.1002/hbm.1058 · Cited by 6,256
Cited by
Scikit-learn: Machine Learning in Python
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Müller, A., Nothman, J., Louppe, G., et al. (2012) · arXiv · doi:10.48550/arxiv.1201.0490 · Cited by 71,016
LIBSVM: A library for support vector machines
Chang, C.-C., & Lin, C.-J. (2011) · ACM Transactions on Intelligent Systems and Technology · doi:10.1145/1961189.1961199 · Cited by 40,918
Machine learning for neuroimaging with scikit-learn
Abraham, A., Pedregosa, F., Eickenberg, M., Gervais, P., Mueller, A., Kossaifi, J., Gramfort, A., Thirion, B., & Varoquaux, G. (2014) · Frontiers in Neuroinformatics · doi:10.3389/fninf.2014.00014 · Cited by 2,384
Nipype: A Flexible, Lightweight and Extensible Neuroimaging Data Processing Framework in Python
Gorgolewski, K., Burns, C. D., Madison, C., Clark, D., Halchenko, Y. O., Waskom, M. L., & Ghosh, S. S. (2011) · Frontiers in Neuroinformatics · doi:10.3389/fninf.2011.00013 · Cited by 2,186
Self-citationPisner, D. A., & Schnyer, D. M. (2020) · Machine Learning · doi:10.1016/b978-0-12-815739-8.00006-7 · Cited by 1,004
Assessing and tuning brain decoders: Cross-validation, caveats, and guidelines
Varoquaux, G., Raamana, P. R., Engemann, D. A., Hoyos-Idrobo, A., Schwartz, Y., & Thirion, B. (2017) · NeuroImage · doi:10.1016/j.neuroimage.2016.10.038 · Cited by 792
Grootswagers, T., Wardle, S. G., & Carlson, T. A. (2017) · Journal of Cognitive Neuroscience · doi:10.1162/jocn_a_01068 · Cited by 727
Decoding Neural Representational Spaces Using Multivariate Pattern Analysis
Haxby, J. V., Connolly, A. C., & Guntupalli, J. S. (2014) · Annual Review of Neuroscience · doi:10.1146/annurev-neuro-062012-170325 · Cited by 717
“…location of A a representational space can be investigated using searchlight analyses (Kriegeskorte et al. 2006, Chen et al. 2011, Oosterhof et al. 2011), and the topographic organization of that representation representational space into individual subjects’ topographies (Haxby et al. 2011).”
MethodSelf-citationCoSMoMVPA: Multi-Modal Multivariate Pattern Analysis of Neuroimaging Data in Matlab/GNU Octave
Oosterhof, N. N., Connolly, A. C., & Haxby, J. V. (2016) · Frontiers in Neuroinformatics · doi:10.3389/fninf.2016.00027 · Cited by 658
Self-citationA Common, High-Dimensional Model of the Representational Space in Human Ventral Temporal Cortex
Haxby, J. V., Guntupalli, J. S., Connolly, A. C., Halchenko, Y. O., Conroy, B. R., Gobbini, M. I., Hanke, M., & Ramadge, P. J. (2011) · Neuron · doi:10.1016/j.neuron.2011.08.026 · Cited by 648
Self-citationKasabov, N. K. (2014) · Neural Networks · doi:10.1016/j.neunet.2014.01.006 · Cited by 454
Hebart, M. N., Görgen, K., & Haynes, J.-D. (2015) · Frontiers in Neuroinformatics · doi:10.3389/fninf.2014.00088 · Cited by 437
PRoNTo: Pattern Recognition for Neuroimaging Toolbox
Schrouff, J., Rosa, M. J., Rondina, J. M., Marquand, A. F., Chu, C., Ashburner, J., Phillips, C., Richiardi, J., & Mourão-Miranda, J. (2013) · Neuroinformatics · doi:10.1007/s12021-013-9178-1 · Cited by 429
The Representation of Biological Classes in the Human Brain
Connolly, A. C., Guntupalli, J. S., Gors, J., Hanke, M., Halchenko, Y. O., Wu, Y.-C., Abdi, H., & Haxby, J. V. (2012) · The Journal of Neuroscience · doi:10.1523/jneurosci.5547-11.2012 · Cited by 410
Self-citationSchlichting, M. L., Mumford, J. A., & Preston, A. R. (2015) · Nature Communications · doi:10.1038/ncomms9151 · Cited by 381
Multivariate pattern analysis of fMRI: The early beginnings
Haxby, J. V. (2012) · NeuroImage · doi:10.1016/j.neuroimage.2012.03.016 · Cited by 378
Self-citationStelzer, J., Chen, Y., & Turner, R. (2013) · NeuroImage · doi:10.1016/j.neuroimage.2012.09.063 · Cited by 372
“These tests have now also been adapted to fMRI studies using classi fi cation-based MVPA (Chen et al., 2011; Pereira and Botvinick, 2011) and MVPA toolboxes (Hanke et al., 2009).”
Dynamic Interaction between Reinforcement Learning and Attention in Multidimensional Environments
Leong, Y. C., Radulescu, A., Daniel, R., DeWoskin, V., & Niv, Y. (2017) · Neuron · doi:10.1016/j.neuron.2016.12.040 · Cited by 294
Acute social isolation evokes midbrain craving responses similar to hunger
Tomova, L., Wang, K. L., Thompson, T., Matthews, G. A., Takahashi, A., Tye, K. M., & Saxe, R. (2020) · Nature Neuroscience · doi:10.1038/s41593-020-00742-z · Cited by 283
A Hitchhiker's Guide to Functional Magnetic Resonance Imaging
Soares, J. M., Magalhães, R., Moreira, P. S., Sousa, A., Ganz, E., Sampaio, A., Alves, V., Marques, P., & Sousa, N. (2016) · Frontiers in Neuroscience · doi:10.3389/fnins.2016.00515 · Cited by 272
Functional subregions of the human entorhinal cortex
Maass, A., Berron, D., Libby, L. A., Ranganath, C., & Düzel, E. (2015) · eLife · doi:10.7554/elife.06426 · Cited by 269
Strong Evidence for Pattern Separation in Human Dentate Gyrus
Berron, D., Schutze, H., Maass, A., Cardenas-Blanco, A., Kuijf, H. J., Kumaran, D., & Duzel, E. (2016) · Journal of Neuroscience · doi:10.1523/jneurosci.0518-16.2016 · Cited by 268
Memory Consolidation by Replay of Stimulus-Specific Neural Activity
Deuker, L., Olligs, J., Fell, J., Kranz, T. A., Mormann, F., Montag, C., Reuter, M., Elger, C. E., & Axmacher, N. (2013) · The Journal of Neuroscience · doi:10.1523/jneurosci.0414-13.2013 · Cited by 263
Resting developments: a review of fMRI post-processing methodologies for spontaneous brain activity
Margulies, D. S., Böttger, J., Long, X., Lv, Y., Kelly, C., Schäfer, A., Goldhahn, D., Abbushi, A., Milham, M. P., Lohmann, G., et al. (2010) · Magnetic Resonance Materials in Physics, Biology and Medicine · doi:10.1007/s10334-010-0228-5 · Cited by 240
A Distinct Role of the Temporal-Parietal Junction in Predicting Socially Guided Decisions
Carter, R. M., Bowling, D. L., Reeck, C., & Huettel, S. A. (2012) · Science · doi:10.1126/science.1219681 · Cited by 238
O'Toole, A. J., Jiang, F., Abdi, H., Pénard, N., Dunlop, J. P., & Parent, M. A. (2007) · Journal of Cognitive Neuroscience · doi:10.1162/jocn.2007.19.11.1735 · Cited by 238
When the Brain Takes a Break: A Model-Based Analysis of Mind Wandering
Mittner, M., Boekel, W., Tucker, A. M., Turner, B. M., Heathcote, A., & Forstmann, B. U. (2014) · The Journal of Neuroscience · doi:10.1523/jneurosci.2062-14.2014 · Cited by 228
“After obtaining the optimal parameters for the SVM, we calculated noise-perturbation scores as implemented in PyMVPA (Hanke et al., 2009) for each feature.”
Dynamic updating of hippocampal object representations reflects new conceptual knowledge
Mack, M. L., Love, B. C., & Preston, A. R. (2016) · Proceedings of the National Academy of Sciences · doi:10.1073/pnas.1614048113 · Cited by 223
“The neural similarity between stimulus-specific activation patterns from the second half of learning was assessed with a searchlight method (35, 70) such that the Pearson correlation was calculated for all pairwise stimulus-specific activation patterns from a three-voxel radius sphere.”
MethodCategory-dependent and category-independent goal-value codes in human ventromedial prefrontal cortex
McNamee, D., Rangel, A., & O'Doherty, J. P. (2013) · Nature Neuroscience · doi:10.1038/nn.3337 · Cited by 216
A Model of Representational Spaces in Human Cortex
Guntupalli, J. S., Hanke, M., Halchenko, Y. O., Connolly, A. C., Ramadge, P. J., & Haxby, J. V. (2016) · Cerebral Cortex · doi:10.1093/cercor/bhw068 · Cited by 203
“We de fi ned surface searchlights (as implemented in PyMVPA) in all subjects (Oosterhof et al. 2011) in which each surface node was the center of a searchlight cortical disc of radius 20 mm.”
MethodInfluentialSelf-citationAdaptive Coding of Task-Relevant Information in Human Frontoparietal Cortex
Woolgar, A., Hampshire, A., Thompson, R., & Duncan, J. (2011) · The Journal of Neuroscience · doi:10.1523/jneurosci.2616-11.2011 · Cited by 202
“Multivoxel pattern analyses were performed using MultiVariate Pattern Analysis in Python (PyMVPA) software (Hanke et al., 2009), in which support vector machine classification is implemented by wrapping the LIBSVM library (Chang and Lin, 2011).”
MethodInterpretable whole-brain prediction analysis with GraphNet
Grosenick, L., Klingenberg, B., Katovich, K., Knutson, B., & Taylor, J. E. (2013) · NeuroImage · doi:10.1016/j.neuroimage.2012.12.062 · Cited by 201
“Commonly referred to as " multivariate pattern analysis " (Hanke et al., 2009) or " decoding " (to distinguish them from more commonly-used " mass-univariate " methods (Friston et al., 1995)), these approaches have allowed investigators to use activity patterns across multiple voxels to classify…”
InfluentialA common cortical metric for spatial, temporal, and social distance
Parkinson, C., Liu, S., & Wheatley, T. (2014) · The Journal of Neuroscience · doi:10.1523/jneurosci.2159-13.2014 · Cited by 198
Multivoxel Pattern Analysis for fMRI Data: A Review
Mahmoudi, A., Takerkart, S., Regragui, F., Boussaoud, D., & Brovelli, A. (2012) · Computational and Mathematical Methods in Medicine · doi:10.1155/2012/961257 · Cited by 195
“Furthermore, standard libraries implementing SVMs are available such as SVM-light [23], LIBSVM [24], and PyMVPA [25].”
MethodJimura, K., & Poldrack, R. A. (2012) · Neuropsychologia · doi:10.1016/j.neuropsychologia.2011.11.007 · Cited by 190
“Epsilon-insensitive support vector regression (SVR) (Drucker et al., 1997) with a linear kernel, as implemented in PyMVPA (http://www.pymvpa.org/; Hanke et al., 2009), was used to estimate the target value, and leave-one-out cross-validation was applied across the 6 BOLD periods to obtain estimates…”
Ubiquity and Specificity of Reinforcement Signals throughout the Human Brain
Vickery, T. J., Chun, M. M., & Lee, D. (2011) · Neuron · doi:10.1016/j.neuron.2011.08.011 · Cited by 189
“MVPA Analyses MVPA was implemented using PyMVPA (Hanke et al., 2009), and a support vector machine (SVM) algorithm.”
MethodThe Animacy Continuum in the Human Ventral Vision Pathway
Sha, L., Haxby, J. V., Abdi, H., Guntupalli, J. S., Oosterhof, N. N., Halchenko, Y. O., & Connolly, A. C. (2015) · Journal of Cognitive Neuroscience · doi:10.1162/jocn_a_00733 · Cited by 169
“The preparation of the surfaces in this manner was facilitated using a wrapper script (mvpa2-prep-afni-surf ), which itself is freely available through PyMVPA.”
MethodInfluentialSelf-citationMeyers, E. M. (2013) · Frontiers in Neuroinformatics · doi:10.3389/fninf.2013.00008 · Cited by 169
“While its most extensive functionality is also geared toward fMRI decoding analyses (it can perform all the functions available in the princeton-mvpatoolbox), the PyMVPA package also has the ability to handle time series data, and thus it can be used to analyze electrophysiology as well (Hanke et al., 2009).”
BackgroundMethodPrimary sensory cortices contain distinguishable spatial patterns of activity for each sense
Liang, M., Mouraux, A., Hu, L., & Iannetti, G. D. (2013) · Nature Communications · doi:10.1038/ncomms2979 · Cited by 163
Generative adversarial networks for reconstructing natural images from brain activity
Seeliger, K., Güçlü, U., Ambrogioni, L., Güçlütürk, Y., & van Gerven, M. A. J. (2018) · NeuroImage · doi:10.1016/j.neuroimage.2018.07.043 · Cited by 162
“The data of the individual subjects of all datasets were mapped to a common representational space based on hyperalignment (Haxby et al., 2011) using PyMVPA4 (Hanke et al., 2009).”
MethodPredicting risky choices from brain activity patterns
Helfinstein, S. M., Schonberg, T., Congdon, E., Karlsgodt, K. H., Mumford, J. A., Sabb, F. W., Cannon, T. D., London, E. D., Bilder, R. M., & Poldrack, R. A. (2014) · Proceedings of the National Academy of Sciences · doi:10.1073/pnas.1321728111 · Cited by 159
“Hanke M, et al. (2009) PyMVPA: A python toolbox for multivariate pattern analysis of fMRI data.”
MethodMachine Learning for Neuroimaging with Scikit-Learn
Abraham, A., Pedregosa, F., Eickenberg, M., Gervais, P., Muller, A., Kossaifi, J., Gramfort, A., Thirion, B., & Varoquaux, G. P. (2014) · arXiv (Cornell University) · doi:10.48550/arxiv.1412.3919 · Cited by 158
“This example has already been widely analyzed (Hanson et al., 2004; Detre et al., 2006; O’Toole et al., 2007; Hanson and Halchenko, 2008; Hanke et al., 2009) and has become a reference example in matter of decoding.”
MethodSun, D., van Erp, T. G. M., Thompson, P. M., Bearden, C. E., Daley, M., Kushan, L., Hardt, M. E., Nuechterlein, K. H., Toga, A. W., & Cannon, T. D. (2009) · Biological Psychiatry · doi:10.1016/j.biopsych.2009.07.019 · Cited by 148
“We further applied the PyMVPA (Multivariate Pattern Analysis in Python, http://www.pymvpa.org) machine-learning package (15,16) to gray matter density (GMD) maps to determine whether group classification at the individual level could be achieved in the early course of psychosis.”
MethodMeasuring neural representations with fMRI: practices and pitfalls
Davis, T., & Poldrack, R. A. (2013) · Annals of the New York Academy of Sciences · doi:10.1111/nyas.12156 · Cited by 132
Self-Other Representation in the Social Brain Reflects Social Connection
Courtney, A. L., & Meyer, M. L. (2020) · The Journal of Neuroscience · doi:10.1523/jneurosci.2826-19.2020 · Cited by 115
Cohen, J. (2010) · Frontiers in Human Neuroscience · doi:10.3389/fnhum.2010.00047 · Cited by 89
somoclu : An Efficient Parallel Library for Self-Organizing Maps
Wittek, P., Gao, S. C., Lim, I. S., & Zhao, L. (2017) · Journal of Statistical Software · doi:10.18637/jss.v078.i09 · Cited by 80
Geerligs, L., Gözükara, D., Oetringer, D., Campbell, K. L., van Gerven, M., & Güçlü, U. (2022) · eLife · doi:10.7554/elife.77430 · Cited by 78
“To optimally align voxels across participants in the movie dataset, we subsequently used whole-brain searchlight hyperalignment as implemented in the PyMVPA toolbox (Guntupalli et al., 2016; Hanke et al., 2009).”
MethodReliable individual differences in fine-grained cortical functional architecture
Feilong, M., Nastase, S. A., Guntupalli, J. S., & Haxby, J. V. (2018) · NeuroImage · doi:10.1016/j.neuroimage.2018.08.029 · Cited by 68
Self-citationFunctional Heterogeneity and Convergence in the Right Temporoparietal Junction
Lee, S. M., & McCarthy, G. (2016) · Cerebral Cortex · doi:10.1093/cercor/bhu292 · Cited by 51
Neural Correlates of the Conscious Perception of Visual Location Lie Outside Visual Cortex
Liu, S., Yu, Q., Tse, P. U., & Cavanagh, P. (2019) · Current Biology · doi:10.1016/j.cub.2019.10.033 · Cited by 39
Consensus-building conversation leads to neural alignment
Sievers, B., Welker, C., Hasson, U., Kleinbaum, A. M., & Wheatley, T. (2020) · doi:10.31234/osf.io/562z7 · Cited by 25
Mahmoodi, A., Luo, S., Harbison, C., Piray, P., & Rushworth, M. F. S. (2024) · Neuron · doi:10.1016/j.neuron.2024.09.001 · Cited by 17
Shi, D., Shu, L., & Yu, Q. (2025) · doi:10.1101/2025.11.26.690703 · Cited by 1
Metadata
- Authors
- Hanke, M., Halchenko, Y. O., Sederberg, P. B., Hanson, S. J., Haxby, J. V., & Pollmann, S.
- Venue
- Neuroinformatics
- Published
- 2009-01-28
- Volume
- 7
- Issue
- 1
- Pages
- 37-53
- ISSN
- 1539-2791 (ISSN-L)
- 1559-0089
- OpenAlex
- W2097850441
- Cited by
- 483
- References
- 37
- FWCI
- 7.46
- Type
- journal article
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.