120 likes | 291 Views
Computational Methods for Data Analysis Lab session : applying SVM on neuroimaging data. Yuan Tao Yuan.tao@unitn.it. 0. Some prerequisites. How fMRI data look like Python programming language Pymvpa : Multivariate Pattern Analysis (MVPA) in Python
E N D
Computational Methods for Data AnalysisLab session: applying SVM on neuroimaging data Yuan Tao Yuan.tao@unitn.it
0. Some prerequisites • How fMRI data look like • Python programming language • Pymvpa: Multivariate Pattern Analysis (MVPA) in Python • scikit-learn: Machine Learning in Python
1. Experiment design • Conditons Cognition words ABSTRACT CONCEPTS Emotion words Tool words CONCRETE CONCEPTS Dwelling words
1. Experiment design • Paradigm Depression Sadness Distress 3s 10s Time
1. Experiment design • Bold delay 4s • Averaging 4s of data into one volume 4-6s Depression Sadness Distress 3s 10s Time 4 seconds
1. Experiment design • Common MVPA study experiment design • Slow-event design • Multiple scanning sessions facilitates cross-validation
2. Preprocessing • Preparing the dataset for classification analysis • Have a look at the data here • 1. Detrending: linear, session (chunks) –wise detrending to remove signal drift PolyDetrendMapper(polyord=1,chunks_attr='chunks') • 2. Normalization: correct for inhomogeneous voxels ZScoreMapper() • 3. delete volumes that we do not need, i.e. rest, break, and init • 4. average several sequential volumes to generate one mean volume
3. Classification • Challenges from fMRI data • Low Signal-Noise-Ratio (SNR) • Small dataset but large feature space • Features are correlated and redundant • Solutions (hopefully) • Good experiment design and 'good' subjects beyond the scope of this lab practice • Cross-validation: splitting dataset by scanning sessions, and every sample will be tested once • Linear boundary should be sufficient and can avoid overfitting • Performing feature selection • Univariate methods. Selecting the voxels whose activities that • vary the most (one-way ANOVA) • are most consistent • Based on our prior knowledge, e.g. the brain anatomy
3. Classification SESSION 6 • Cross-Validation … SESSION 2 SESSION 1 • Iteration 1: test set:1, training set 2-6 • Iteration 2: test set: 2, training set 1,3-6 • … • Iteration 6: test set6, training set 1-5
3. Classification • General Steps: see ipython-notebook
3. Classification • SVM • 1. Kernel • Linear kernel • RBF kernel • 2. Parameter tunning grid search