EEG processing pipeline with autoreject

Hello @eduardo,

This will include eog in the returned reject dictionary – which might not be what you want, as it will lead to the removal of epochs with blinks. You may wish to consider passing ch_types='eeg' to only retrieve a rejection threshold for EEG.

Note that reject is simply ignored if you pass epochs to ICA.fit(). This is a little bit hidden in the documentation (and a reminder for me that we should add a clear warning):

If you want to fit ICA on epochs with a peak-to-peak rejection threshold applied, you must drop the bad epochs before ICA, either by calling Epochs.drop_bad() or by passing reject to Epochs() on instantiation.

Yes, this is a good idea. In fact, it appears that using autoreject “local” before and after ICA is in fact a good choice – we were seeing some issues with autoreject “global” before ICA in EEG layouts with some electrodes placed close to the eyes, like Fp1/Fp2. The respective tutorial has been updated very recently by @mainakjas:

I think it has not yet been deployed to the autoreject documentation website, therefore I’m linking to the file on GitHub.

That’s what we do in the MNE-BIDS-Pipeline before ICA. However, the problem with fixed thresholds is that … they’re fixed (surprise!), and the same thresholds might now work across all participants in your study. On the other hand, autoreject “global” led to problems in some of our datasets (see my comments above), and running auroreject “local” twice (before and after ICA) can be quite time-consuming. It’s a tradeoff, really.

Yes, depending on your data and specific analysis, you may want to use MNE-Python’s Scaler or scikit-learn’s StandardScaler, see Decoding (MVPA) — MNE 1.7.0.dev15+gb107d92ec documentation for examples how to use them.

2 Likes