EEG preprocessing: a starting checklist
The steps we go through before a single model touches an EEG recording — and why most of them are about the signal, not the algorithm.
A classifier can only be as good as the signal it is given. Before we compare models on an EEG dataset, we go through the same short list of checks. None of this is new; writing it down keeps us honest.
1. Look at the raw signal
Plot every channel, unfiltered, for the whole session. Flat lines, sudden steps and channels that look nothing like their neighbours are easier to spot by eye than by any automatic metric. Note the bad channels and the time ranges you do not trust.
2. Check the recording parameters
- Sampling rate. Know it, and check that the timestamps agree with it.
- Reference. Record which reference was used during acquisition. Re-referencing later (for example to the common average) changes what every channel means.
- Units and scaling. Confirm whether values are in microvolts or raw ADC counts before comparing amplitudes.
3. Remove line noise
Mains interference appears as a narrow peak at 50 Hz in Turkey and Europe, and 60 Hz in North America, often with harmonics. A notch filter or a spectrum-based removal method handles it. Check the power spectrum before and after.
4. Band-pass filter for the question
Choose the pass band for the phenomenon you study, not by habit. A high-pass around 0.5–1 Hz removes slow drifts; the low-pass depends on the rhythms of interest. Use zero-phase filtering for offline analysis, and remember that a real-time system cannot look into the future — causal filters introduce delay.
5. Handle artifacts deliberately
Eye blinks, eye movements, jaw clenching and cable movement all leave large traces in EEG. Decide per study whether to reject affected segments, correct them (for example with independent component analysis) or keep them and let the model cope. Whatever you choose, record it.
6. Split the data the way it will be used
If the system will be used by people it has never seen, evaluate it on people it has never seen. Splitting segments from the same session into training and test sets makes results look better than they will be in practice.
7. Write it down
Every choice above changes the result. We keep the parameters next to the data so the analysis can be repeated — by us, or by anyone we share it with.
This note is part of our lab log. Corrections and questions are welcome through the collaboration page.