# Common Spatial Pattern for EEG Signals

I am having difficulty in understanding the use of CSP for EEG signal feature extraction and subsequently. Since I am using two classes, this query will be restricted to it.

In essence CSP requires 2 classes of trial data, i.e C1, the covariance matrix for class 1, and C2, the covariance matrix for the second class, for calculating W, the spatial filter matrix, using eigenvectors/eigenvalues. Following the procedure the log variance is calculated. This is useful during the training phase.

However when I conduct a trial, it will belong to either C1 or C2. I cannot calculate the CSP for this particular trial.

How are features of the EEG Signal extracted then?

I am not too sure if this is the correct forum for asking this question. I apologise in advance. Please suggest the correct forum for the same.

CSP gives you a matrix $W$ that represents a spatial transformation of your EEG $X$. When using CSP, $W^TX$ will have the property of maximal variance for one class while minimal variance on the other class. Therefore, when using CSP for classification, the features are the variance of $W^TX$. In practice, the log-variance has a better distribution.
An interesting and brief explanation of CSP can be found on doi:10.1109/MMSP.2010.5662067 (until section II, then it goes on Riemannian geometry which might be out of your scope).