Full Correlation Matrix Analysis (FCMA) demo

Overview

Table of Contents

1. FCMA Step1: Feature (voxel) selection

1.1 The goal
1.2 Data preprocessing
1.3 Understanding preprocessed data
1.4 Feature selection with simplified implementation
1.5 Understading the outputs of feature selection
1.6 Perform feature selection with actual FCMA implementation
1.7 Select n top performed features

2. FCMA Step 2: Classification using the selected features (voxels)

2.1 The goal
2.2 Classification steps
2.3 Understanding the outputs of classification
2.4 Perform classification for all outer loop folds using FCMA script

3. Results visualizations

3.1 Examine classification accuracy for different top-n-mask
3.2 Visualize voxels in top-n-masks
3.3 Visualize functional connectivity pattern with circos plot

4. Summary

Important details of simulated data

1. FCMA Step1: Feature (voxel) selection

1.1 The goal

1.2 Data preprocessing

1.3 Understanding preprocessed data

1.4 Feature selection with simplified implementation

Steps:

  1. First, we enlarge the feature space by computing the correlation matrix of all voxels in the brain. Because the simulated brain only has 432 voxels, this yields a 432 x 432 correlation matrix. Each row/column is the functional connectivity between a given voxel and all other voxels in the brain.
  1. For each voxel, we want to know how well its functional connectivity with every other brain voxel differentiates the task conditions. Thus, for each brain voxel, we can
    • A) Extract the corresponding row from each subject's correlation matrix, resulting a single array for each subject.
    • B) Perform an inner loop leave-one-out cross validation. That is, for each fold, one subject will be left out and so 7-1 = 6 arrays (one for each subject) will be used as the training set and the left out array will be used as the validation set. The classification algorithm used here is SVM with linear kernel. Other binary classification algorithms can be applied as well.
    • C) A prediction accuracy value for this selected voxel could be computed for each fold.
    • D) Final prediction accuracy for this voxel could can be averaged across the 7 folds.

1.5 Understanding the outputs of feature selection

1.6 Perform feature selection with actual FCMA implementation

1.7 Select n top-performing features

2. FCMA Step 2: Classification using the selected features (voxels)

2.1 The goal

2.2 Classification steps

  1. Preprocess all 8 subjects' data as we have discussed above, yielding a list of labels of the length equals 20 (epochs/subject) * 8 (subjects) = 160, and a list of epoch data of the same length. Within each epoch (i.e., each entry in the variable "int_data" in the code below), there is a 2d array of [timepoint, nVoxel]. Note that nVoxel depends on the size of the top n masks we are using.

  2. Divide the data into training and testing set. This is exactly the same as the feature selection step except that now we have already selected meaningful voxels from the training set. In this demo, the training set is subject 1 - 7 and the testing set is subject-0.

  3. Train a model using the FC pattern within the top voxels. Just like the voxel selection, here we use SVM classifer with precomputed kernel. Other classifiers can be used here, too.

  4. Test the model using the left out subject.

2.3 Understanding the outputs of classification

  1. Decision function outputs: a list of values that have the length equal to the number of epochs (in the case of a two way classification, one-versus-one). Each value indicates an epoch's location relative to the hyperplane defined in SVM. The sign of the output indicates the class of the epoch and the absolute value indicates the confidence of the classification of this epoch.
  2. Class prediction: a list of values that has the length equal to the number of epochs (in the case of a two way classification). Each value indicates the guessed class of the epoch (which condition).
  3. Classification accuracy: correctly classified epochs / total epochs.

2.4 Perform classification for all outer loop folds using FCMA script

3 Results Visualizations

3.1 Examine classification accuracy for different top-n-mask

3.2 Visualize voxels in top-n-masks

3.3 Visualize functional connectivity pattern with circos plot

4. Summary