Searchlight predicted label


From the documentation, I understand that I can get the predicted accuracy by looking at “scores_” in the fitted searchlight object. For example

pipeline = make_pipeline(StandardScaler(), SVR(kernel = 'linear'))

searchlight_state = nilearn.decoding.SearchLight(mask, process_mask_img=mask, scoring = "explained_variance", estimator = pipeline, radius=4, n_jobs=24, verbose=0, cv=LeaveOneOut()), sE, runs) 
mean_fmri = nilearn.image.mean_img(fmri_img)
score_img = new_img_like(mean_fmri, searchlight_state.scores_)

My question is, can I retrieve the predicted label, the predicted y value, or the probability for each label?



Ahoi hoi @kaihwang,

I think you would have to adapt the code as it currently only stores the scores for each voxel but not the predict label, as you can see here. However, also looping in @bthirion.

HTH, cheers, Peer

Indeed, you need to dig into the code and modify it to get the values you want.
Sorry, but this seems to be a slightly unusual usecase.