I started to use nilearn for running a decoding analysis (MVPA). We chose to use Betas obtained from a 1st level GLM, but is it possible and HOW can we feed one of the decoding nilearn function with these betas instead of 4D images (e.g., raw bold)? I am looking for a way to do that but I have to say that it was not very clear to me…
region_data gives you a voxel-by-observation (in this case, images/betas) array – your feature matrix, X. You can have a separate label vector, Y, corresponding to the conditions for each beta image (e.g., [0, 1, 0]). From there you have what you need for classification in scikit-learn or some of nilearn’s functions.