mne-tools / mne-bids-pipeline

Automatically process entire electrophysiological datasets using MNE-Python.
https://mne.tools/mne-bids-pipeline/
BSD 3-Clause "New" or "Revised" License
134 stars 65 forks source link

BUG: Decoding M/EEG data needs to scale channel types #849

Closed larsoner closed 5 months ago

larsoner commented 6 months ago

Looking at our code, I think the way decoding works with multiple channel types (MEG and EEG) currently won't do what we want. At least for CSP we just use sklearn's PCA(rank), but if your EEG is rank deficient, the noise in the numerical estimate of the null space of the EEG channels could end up around the same amplitude of the useful/correct MEG channels. So we should probably apply a simple mne.decoding.Scaler in the pipeline before the PCA step. I'll double check if this is the case