Common Spatial Patterns (CSP)

A vectorized, quick and simple implementation of the CSP algorithm.

http://www.gib.tel.uva.es/members.php#martinezcagigal_v

您现在正在关注此提交

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.

引用格式

Víctor Martínez-Cagigal (2026). Common Spatial Patterns (CSP) (https://ww2.mathworks.cn/matlabcentral/fileexchange/72204-common-spatial-patterns-csp), MATLAB Central File Exchange. 检索时间: .

类别

Help CenterMATLAB Answers 中查找有关 Discrete Multiresolution Analysis 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0