DecoderRegressor r2 interpretation

Summary of what happened:

I am trying to understand how I should interpret the output of cross-validation scores with “r2” specified for the scoring metric. The values I am getting are above 1 (ranges from 0 to 9.0). I am guessing this is not the square of the correlation between my predicted data and the test data?

Command used (and if a helper script was used, a link to the helper script or the command generated):

decoder = DecoderRegressor('ridge', cv=10, mask=temp_roi_mask, scoring='r2',
                               n_jobs=8)    
decoder.fit(file_list, decode_encode_df[feature])    
prediction_score = -np.mean(decoder.cv_scores_['beta'])

Version:

nilearn 0.9.3.dev0

Environment (Docker, Singularity, custom installation):

I am running this through an anaconda installation on my linux.

Hi,
Indeed an R2 score should never be larger than 1. Do you have any possibility to share a script/data for us to reproduce such a weird result ?
Thx in advance.
Bertrand

Note that I tried based on the Nilearn example using it and could not reproduce the issue.

Okay. I finally have the relevant data on OSF.

A little more information about this dataset. For the task, there are 76 stimuli presented once per 10 runs. So I got a total of 760 beta maps for one subject. What I am trying to do is decode a set of features from the neural data. For example, component 3 from the PCA data (also in the repo) is valence. I want to know how well each brain region in a parcellation is able to decode the valence scores for my 76 stimuli.

Eventually, I want to recreate figure 2.A from this paper. So instead of getting the r2 score for the decoder, if I could just get the predicted scores from the decoder, that might make things easier for me. Is there a way to get that with the DecoderRegressor command?

Thanks so much for your help!

Maybe I can do this another way. Is there a method to get the predicted values from the DecoderRegressor function?

You may simply want to call the predict() method of the DecoderRegressor with the corresponding X value. HTH,
Bertrand