Using sklearn PLSRegression on fmri correlation matrices



Given X = n correlation matrices (between ROIs of the brain) and y = multivariate response variable of dimension n*t, we’d like to implement PLSRegression (using sklearn). t=6 in our case.

pls = PLSRegression(n_components = 6), y)

The correlationmatrices are obtained using nilearn as below:

correlationmeasure = ConnectivityMeasure(kind=‘correlation’, vectorize=True)
correlationmatrices = correlationmeasure.fit_transform(abide_subjects)

abide_subjects is a list of timeseries of the images obtained as follows:

However, the prediction for y seems very off and the mean classification accuracy is always 0.

What is wrong/missing with the above approach?


Could you please try to give us a reproducible script to understand what’s wrong. For instance, you can use from nilearn import datasets and use datasets.fetch_adhd or fetch_abide_pcp with n_subject=3 or 4.

Thanking you a lot for the script.


You may want to try with a more classic regression mdoel, e.g. RidgeRegression. If the prediction is really off, this means that y cannot be well predicted by X.