Neha Patil (Editor)

Common spatial pattern

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

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.

Contents

Details

Let X 1 of size ( n , t 1 ) and X 2 of size ( n , t 2 ) be two windows of a multivariate signal, where n is the number of signals and t 1 and t 2 are the respective number of samples.

The CSP algorithm determines the component w T such that the ratio of variance (or second-order moment) is maximized between the two windows:

w = arg max w w X 1 2 w X 2 2

The solution is given by computing the two covariance matrices:

R 1 = X 1 X 1 T t 1 R 2 = X 2 X 2 T t 2

Then, the simultaneous diagonalization of those two matrices (also called generalized eigenvalue decomposition) is realized. We find the matrix of eigenvectors P = [ p 1 p n ] and the diagonal matrix D of eigenvalues { λ 1 , , λ n } sorted by decreasing order such that:

P 1 R 1 P = D

and

P 1 R 2 P = I n

with I n the identity matrix.

This is equivalent to the eigendecomposition of R 2 1 R 1 :

R 2 1 R 1 = P D P 1 w T will correspond to the first column of P : w = p 1 T

Relation between variance ratio and eigenvalue

The eigenvectors composing P are components with variance ratio between the two windows equal to their corresponding eigenvalue:

λ i = p i T X 1 2 p i T X 2 2

Other components

The vectorial subspace E i generated by the i first eigenvectors [ p 1 p i ] will be the subspace maximizing the variance ratio of all components belonging to it:

E i = arg max E ( min p E p T X 1 2 p T X 2 2 )

On the same way, the vectorial subpsace F j generated by the j last eigenvectors [ p n j + 1 p n ] will be the subspace minimizing the variance ratio of all components belonging to it:

F j = arg min F ( max p F p T X 1 2 p T X 2 2 )

Variance or second-order moment

CSP can be applied after a mean subtraction (a.k.a. "mean centering") on signals in order to realize a variance ratio optimization. Otherwize CSP optimizes the ratio of second-order moment.

Choice of windows X1 and X2

  • The standard use consists on choosing the windows to correspond to two periods of time with different activation of sources (e.g. during rest and during a specific task).
  • It is also possible to choose the two windows to correspond to two different frequency bands in order to find components with specific frequency pattern. Those frequency bands can be on temporal or on frequential basis. Since the matrix P depends only of the covariance matrices, the same results can be obtained if the processing is applied on the Fourier transform of the signals.
  • Y. Wang has proposed a particular choice for the first window X 1 in order to extract components which have a specific period. X 1 was the mean of the different periods for the examined signals.
  • If there is only one window, R 2 can be considered as the identity matrix and then CSP corresponds to Principal component analysis.
  • Applications

    This method can be applied to several multivariate signal but it seems that most works on it concern electroencephalographic signals.

    Particularly, the method is mostly used on brain–computer interface in order to retrieve the component signal which best transduce the cerebral activity for a specific task (e.g. hand movement).

    It can also be used to separate artifacts from electroencephalographics signals.

    An adaptation of the common spatial pattern for event-related potentials has been formalized in .

    References

    Common spatial pattern Wikipedia