Censoring with NiLearn's fit_transform

It looks like censoring can be performed with the NiLearn’s fit_transform function. Does anyone of a good written description of exactly how censoring is performed with this function? I have found some discussions here and there, but nothing that is comprehensive.

Hi,

There seem to be several fit_transform functions in nilearn, may you please specify which one you are referring to?

If I were to guess, I would venture you are referring to functions that have the sample_mask parameter, which is just a binary indices of volumes to remove (e.g. scrubbing for high motion). I think that passing in this mask adds the corresponding one-hot encoded vectors to the GLM before fitting it. Does that make sense?

Best,
Steven

Thank you! That’s helpful. I was planning on using the one associated with NiftiLabelsMasker. I guess my main question is if there is any type of interpolation performed after the removal of volumes. In general, it would be really helpful to see a write up of everything NiftiLabelsMasker does and can do. I imagine this must exist, but the documentation I can find doesn’t seem totally comprehensive.

AFAIK there is no interpolation whatsoever done after scrubbing. Some “rows” are removed from the data matrix, period.
But you’re absolutely right that this should be demoed…
Best,
Bertrand