Skip to content

m-guggenmos/megmvpa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEG MVPA Tutorial (Python & Matlab)

This tutorial accompanies the paper Multivariate pattern analysis for MEG: a comparison of dissimilarity measures.

Citation: Guggenmos, M., Sterzer, P., & Cichy, R. M. (2018). Multivariate pattern analysis for MEG: a comparison of dissimilarity measures. NeuroImage. DOI: 10.1016/j.neuroimage.2018.02.044

Python tutorial

Preparation

This tutorial is based on IPython/Jupyter Notebook files, which are linked below. In addition, the tutorial can be downloaded as a zip file, which includes the notebook files, additional code files and the example dataset used for this tutorial. To reduce computational costs, the dataset is for one participant only and includes only 9 of 92 experimental conditions.

Content of the zip file:

File Description
cv.py containing code for pseudo-trials/permutations/cross-validation
dissimilarity.py containing a number of custom dissimilarity measures
weird.py weighted robust distance classifier (WeiRD), see also here
python_decoding.ipynb Notebook on Decoding
python_reliability.ipynb Notebook on RDMs and Reliability
python_distance.ipynb Notebook on Distance measures and cross-validation
data01_sess1.npy data for subject 1, session 1
data01_sess2.npy data for subject 1, session 2
labels01_sess1.npy trial labels for subject 1, session 1
labels01_sess2.npy trial labels for subject 1, session 2

In addition, the tutorial requires 4 established scientific python packages: numpy, scipy, scikit-learn, matplotlib

List of tutorials:

Matlab tutorial

Preparation

This tutorial is based on IPython/Jupyter Notebook files, which are linked below. In addition, the tutorial can be downloaded as a zip file, which includes the notebook files, additional code files and the example dataset used for this tutorial. To reduce computational costs, the dataset is for one participant only and includes only 9 of 92 experimental conditions.

Content of the zip file:

File Description
cov1para.m Shrinkage code (Ledoit & Wolf, 2004) for covariances
weirdtrain.m & weirdpredict.m Weighted Robust Distance (WeiRD) classifier
gnbtrain.m & gnbpredict.m Gaussian Naive Bayes (GNB) classifier
matlab_decoding.ipynb Notebook on Decoding
matlab_reliability.ipynb Notebook on RDMs and Reliability
matlab_distance.ipynb Notebook on Distance measures and cross-validation
data01_sess1.mat data for subject 1, session 1
data01_sess2.mat data for subject 1, session 2
labels01_sess1.mat trial labels for subject 1, session 1
labels01_sess2.mat trial labels for subject 1, session 2

In addition, the tutorial assumes a working LIBSVM installation for Matlab.

List of tutorials:

About

MEG MVPA Tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published