Nilearn decoding on non-raw data

Hi,
There was a discussion here regarding decoding raw fmri data (applying assumed delay, as an approximation for the hrf- some mentioned that results were often similar to decoding after a glm fit, in case of block design).
What is the current alternative in nilearn?
I haven’t found any example in the nilearn documentation referring to applying data from glm analysis in order to incorporate the “delay”, nor any example convolving the stimulus with an hrf model (should I use nipype for this? nitime? pymvpa?).
Any help would be appreciated.
Thanks!

Hi brai,
i was the one originally posting the question about raw data decoding. There is no ultimate answer imho. Each strategy makes assumptions, e.g. the GLM/HRF choices may or may not be correct (or vary across brain regions and subjects), and decoding on raw data will face the same issues. One could argue that GLM is more principled, but one may also be concerned about mismodeling… I in practice haven’t found it to make a difference (for crude tasks like face vs. house decoding or fingertapping - but this may change if it gets more nuanced). Thus, to your question about “alternative in nilearn”, i don’t think there is any. Have you looked at nistats? that would allow you to do the job consistently in python, but i don’t think there is a specific example. Best, r

1 Like

I believe NiBetaSeries has producing such deconvolved event series as a goal, and it may be the case that the easiest way to get these is to help them reach that goal. @jdkent is the primary dev over there and can probably tell you how much work it would be.

1 Like

Thanks @effigies!

@brai, I think the relevant issue is adding the betaseries files to the output directory.

I assume preprocessing with some sort BIDS compatible preprocessing application (pretty much FMRIPREP at the moment), and the code will model the HRF on a per-trial basis (using a combination of the other trials as a separate regressor).

You can read my intro to the topic in the documentation.

I would be happy to work with you to add this functionality if you wanted to contribute to NiBetaSeries. Otherwise, I think this issue is moving up the priority queue and should be completed the next time I do a personal hackathon (so within the next month).

Best,
James

1 Like

Many thanks for your response!

I’ll try to prioritize contributions to open source projects in our lab…
Will update as soon as it will work out. :slight_smile: