For each subject, A. the subcortical voxels and the cortical gray matter voxels were identified using the Harvard-Oxford subcortical and cortical atlases respectively, and B. the timeseries in each of these voxels was extracted. To reduce the computational complexity of the gradient estimation, C. the PCA of the cortical gray matter timeseries was taken, resulting in a cortical gray matter PCA matrix. D. The Pearson correlation between the cortical gray matter PCA matrix and the subcortical timeseries matrix was computed, resulting in a subcortical-cortical correlation matrix. E. The subcortical similarity matrix was estimated by computing the row-wise Pearson correlation of the subcortical-cortical correlation matrix, and F. diffusion embedding was applied to the subcortical similarity matrix resulting in the gradient space representation of the subcortical voxels.