Repository navigation
Results
After preprocessing all of the fMRI data, I had to convert the data into a compressed representation for the machine learning models to handle. Example representations include functional connectivity (FC) and intersubject correlation (ISC). To generate the FCs of subjects, I used Nilearn.
There are two generation scripts because depending on how you cut up the brain, you can get different FCs. However, the general FC generation steps are as follows:
- Provide the program with a set of coordinates (such as Power or Yeo).
- For each coordinate, generate a sphere around that coordinate and average the time series signal in that sphere.
- For each sphere, calculate the correlation between every other sphere.
- Store the correlations in a matrix.
Generating a functional connectivity from the Power's atlas yields this matrix:

For this matrix, each row and column is a node in the Power's atlas, which has 264 nodes. So, this means each cell in the matrix is the correlation strength between each node and the rest of the nodes in the atlas (self/recurrent connections are ignored and are set to zero). One issue with this atlas is that each node isn't easily labeled so determining which connections are stronger/weaker is difficult compared to a labeled atlas like Yeo. A more interpretable representation of the FC matrix is the correlation graph superimposed onto a brain as shown below:

This visualization makes it easier to map node location to brain area but without thresholding the connection strength, it becomes too much to handle.
After the FCs are generated, I didn't have access to the labels (cognitive measures) so I tried some unsupervised models. This included testing PCA, ICA, K-means, and t-SNE and then back-projecting the transformed data back into an FC. This was somewhat successful and the results are shown below.
When I run the PCA on the FC data, I decide how many components/dimensions to reduce the data to. In this case, I choose three for ease of visualization. The first PCA component can explain ~20% of the variance in the data and by back-projecting it as an FC matrix, I get this:

This matrix is the first PCA component meaning these are the connections that explain ~20% of the variance in the data. In other words, 20% of the differences in the data that we see can be explained by these connections (since each PCA component places a weight on each connection so the greater the weight, the greater the contribution of that connection to explaining the variance). If I run a different dimensionality reduction technique, such as ICA, I get these results:

The same as for PCA, this matrix is the first ICA component back-projected into FC matrix space. However, instead of each connection/cell weight representing that connection's contribution to explained variance as in PCA, each connection in ICA represents it's contribution to an independent component/network in the data. This is more tricky to interpret but I've moved on from it.
Once I had the labels, I performed a matching between subjects and labels to get the subjects with labels (not all subjects had labels, and vice versa). After this, I tried various supervised models to tease out any link between FC and cognitive score (IQ). I didn't find any promising results as shown below. The Python scripts:
