Common Spatial Patterns (CSP)
The function 'csp' performs a bearable implementation of the Common Spatial Patterns (CSP) algorithm, which consists of a binary data-driven supervised data projection of a signal by maximizing the variance of the positive class while minimizing the variance of the negative one.
Input parameters:
- X1 and X2: Signals for the positive and negative class, respectively, whose dimensions must be [classes x samples].
Output parameters:
- W: Filter matrix (mixing matrix), whose columns are spatial filters.
- lambda: Eigenvalues of each filter.
- A: Demixing matrix.
Once the W is trained, the projection of new data X must be computed as:
X_csp = W'*X;
An example of use is included in the 'csp_example.m' file.
Cita come
Víctor Martínez-Cagigal (2024). Common Spatial Patterns (CSP) (https://www.mathworks.com/matlabcentral/fileexchange/72204-common-spatial-patterns-csp), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0 |