Common spatial pattern

Common spatial pattern (CSP) is a mathematical procedure used in signal processing for separating a multivariate signal into additive subcomponents which have maximum differences in variance between two windows.

be two windows of a multivariate signal, where

are the respective number of samples.

The CSP algorithm determines the component

such that the ratio of variance (or second-order moment) is maximized between the two windows: The solution is given by computing the two covariance matrices: Then, the simultaneous diagonalization of those two matrices (also called generalized eigenvalue decomposition) is realized.

We find the matrix of eigenvectors

and the diagonal matrix

sorted by decreasing order such that: and with

are components with variance ratio between the two windows equal to their corresponding eigenvalue: The vectorial subspace

will be the subspace maximizing the variance ratio of all components belonging to it: On the same way, the vectorial subspace

will be the subspace minimizing the variance ratio of all components belonging to it: CSP can be applied after a mean subtraction (a.k.a.

"mean centering") on signals in order to realize a variance ratio optimization.

Otherwise CSP optimizes the ratio of second-order moment.

Linear discriminant analysis (LDA) and CSP apply in different circumstances.

LDA separates data that have different means, by finding a rotation that maximizes the (normalized) distance between the centers of the two sets of data.

On the other hand, CSP ignores the means.

Thus CSP is good, for example, in separating the signal from the noise in an event-related potential (ERP) experiment because both distributions have zero mean and there is no distinction for LDA to separate.

Thus CSP finds a projection that makes the variance of the components of the average ERP as large as possible so the signal stands out above the noise.

The CSP method can be applied to multivariate signals in generally, is commonly found in application to electroencephalographic (EEG) signals.

Particularly, the method is often used in brain–computer interfaces to retrieve the component signals which best transduce the cerebral activity for a specific task (e.g. hand movement).

[4] It can also be used to separate artifacts from EEG signals.

[2] CSP can be adapted for the analysis of the event-related potentials.

Two sets of overlapping data used to illustrate how CSP can separate the data.
Two sets of data after rotation by CSP to maximize the ratio of the variances along the two axes.