Motor imagery changes band power, which is variance in a band-passed signal, and the change is spatially specific. CSP exploits both. It solves a generalised eigenvalue problem on the two class covariance matrices and returns spatial filters ordered from "high variance for class A, low for class B" to the reverse. The filters at both ends are the discriminative ones.
Taking the log-variance of the signal through the first and last few filters gives a short feature vector, typically 4–6 numbers, that feeds LDA or an SVM. This pipeline has been the standard motor imagery baseline for two decades.
Variants
Regularized CSP
Shrinks covariance estimates towards a stable target. Use it when trials are few or data is noisy, where plain CSP overfits.
Sparse CSP
Constrains filters to few channels, which is more interpretable and needs fewer electrodes.
Filter-bank CSP (FBCSP)
CSP in several frequency bands, then feature selection across bands, so the best band is learned per subject.
Multiclass
One-versus-rest or pairwise CSP extends the two-class method to four-class motor imagery.
CSP is fitted, so it leaks
CSP learns from labels. Fitting it on the whole dataset before cross-validation means the filters have seen the test trials, and the reported accuracy is optimistic, often by a wide margin. CSP belongs inside the model that the trainer refits per fold, not upstream of the split.
CSP in BCILattice
CSP appears in three places. It is a spatial feature family in Feature Extraction. It is a channel selection method, with Regularized CSP and Sparse CSP alongside it, recommended for left- versus right-hand motor imagery. And it is a block in the BCI decoding family on the ML canvas, together with SPoC, Xdawn and SSD. Wired into a trainer with a Validation Scheme, it is refitted on every fold.
Questions
What is Common Spatial Patterns in EEG?
CSP is a supervised spatial filtering method that finds linear combinations of EEG channels whose variance is maximal for one class and minimal for the other. It is the classic feature extractor for motor imagery BCIs.
How many CSP filters should I use?
Usually two or three from each end of the sorted filters, giving four to six features. More filters add noise faster than information.
What is FBCSP?
Filter-bank CSP applies CSP in several frequency bands and selects the most discriminative band-filter pairs. It adapts to each subject's frequency profile and performed best in BCI Competition IV dataset 2a.
Is CSP better than Riemannian methods?
Riemannian classifiers on covariance matrices often match or beat CSP and are less sensitive to tuning. CSP remains a strong, interpretable baseline. Compare both under the same grouped evaluation.
Read the reference
Related
Motor Imagery BCI: EEG Classification Explained
Imagining a movement suppresses the mu and beta rhythms over the opposite motor cortex. A motor imagery BCI detects that suppression and turns it into a command, with no movement and no external stimulus.
Riemannian Geometry for BCI: MDM and Tangent Space
Instead of filtering channels and computing features, Riemannian methods treat each trial's covariance matrix as a point on a curved space and classify it there. They are simple, fast and hard to beat.
EEG Feature Extraction: Which Features to Use
A feature is a reduction of a trial to a number. The right ones depend on where the signal lives (time, frequency, space or the links between channels), and the wrong ones multiply until the model overfits.
Cross-Validation for EEG: LOSO, Grouped and Nested
The split decides what your accuracy means. A random split over trials from one session answers a different, easier question than the one most BCI papers claim to answer.