Best Practices in EEG Analysis: Preprocessing, Modeling, and Machine Learning
Organizations: University of Southern California · McGill University
Abstract
Electroencephalography (EEG) analysis requires careful choices in preprocessing, statistical modeling, and machine learning because EEG signals are highly susceptible to artifacts, volume conduction, low signal-to-noise ratio, and substantial inter-subject variability. This chapter provides a practical and methodological guide to modern EEG analysis, spanning EEG preprocessing, artifact removal, filtering, bad-channel detection and interpolation, re-referencing, independent component analysis (ICA), and preprocessing of simultaneous EEG-fMRI recordings. We review major approaches for computational EEG analysis, including event-related potentials (ERPs), time-frequency analysis, functional and effective connectivity, source localization, multivariate decoding, permutation testing, and multiple-comparison correction. We then examine machine-learning methods for EEG, from feature-based classifiers to deep learning and emerging EEG foundation models, with emphasis on cross-subject generalization, limited-data regimes, data leakage, evaluation metrics, and fair benchmarking. Reproducibility is treated as a core requirement throughout, including transparent preprocessing, BIDS-EEG data organization, standardized derivatives, preservation of raw data, and FAIR data practices. The chapter is intended as a practical reference for researchers developing reliable, interpretable, and reproducible EEG analysis and machine-learning pipelines.
Figures & tables
| Artifact Type | Primary Method(s) | Alternative / Complementary Approaches | Notes |
|---|---|---|---|
| Eye blinks | ICA | Regression (EOG); SSP | Trial rejection is possible but reduces data. ICA typically preserves more neural signal. |
| Eye movements | ICA | Regression (EOG) | Horizontal movements often produce left–right mirrored components. |
| Muscle (EMG) | ICA (focal EMG comp.) | ASR (bursts); epoch rejection; GEDAI | Low-pass filtering reduces EMG but also attenuates high-frequency neural activity. |
| Heartbeat (ECG) | ICA; Regression (ECG) | — | Cardiac components show a periodic structure. In simultaneous EEG-fMRI, pulse artifact correction requires specialized template-based methods (see Section 2.6 ). |
| Line noise (50/60 Hz) | Notch filtering; spectral methods | — | Typically spatially widespread. ICA rarely isolates it effectively. |
| Slow drift / sweat | High-pass filtering | Detrending | Prevention through proper skin preparation and stable temperature is critical. |
Electroencephalography
Electroencephalography (EEG) studies brain-generated electrical activity to understand cognition and support diagnosis, monitoring, and brain-computer interfaces.
See all 174 papers