## 2 Materials and Methods
### CSP-Based Methods
#### 2.1.2 Correlation-Based Common Spatial Patterns  
In order to overcome the shortcomings of sensitivity to noise, instability, and overfitting of the original CSP, CCSPs are proposed in [35] to impose the temporal correlation between signals as a penalty term to obtain a regularization CSP. Therefore, the objective function becomes  
\[J_{1}(w)=\frac{\mathbf{w}^{T}\mathbf{V}_{1}\mathbf{w}}{\mathbf{w}^{T}\mathbf{V}_ {2}\mathbf{w}+\alpha\mathbf{P}_{1}(\mathbf{w})}, \tag{4}\]  
where \(\alpha\) stands for the regularization parameter (\(\alpha>0\)), and \(\mathbf{P}_{1}(\mathbf{w})\) is the penalty term in \(J_{1}(w)\) based on the correlation coefficient  
\[\mathbf{P}_{1}(\mathbf{w})=\mathbf{w}^{T}\mathbf{D}_{1}\mathbf{w} \tag{5}\]  
where \(\mathbf{D}_{1}\) is a diagonal matrix in which the diagonal elements are correlations between the average signal \(\overline{\mathbf{X}_{i}}\), \(i=1,2\) in two classes  
\[\overline{\mathbf{X}_{i}}=\frac{\sum_{l=1}^{L}\mathbf{X}_{i}^{l}}{L},i=1,2, \tag{6}\]  
where \(L\) is the number of trials in each class. The correlation matrix \(\mathbf{R}\in\mathbb{R}^{C\times C}\) is then constructed as  
\[\mathbf{R}=\begin{pmatrix}r_{11}&r_{12}&\cdots&r_{1C}\\ r_{21}&r_{22}&\cdots&r_{2C}\\ \vdots&&\ddots&\vdots\\ r_{C1}&r_{C2}&\cdots&r_{CC}\end{pmatrix}. \tag{7}\]  
In the correlation matrix \(\mathbf{R}\), each element is defined as  
\[r_{m,n}=corr(\overline{x_{1}^{m}},\overline{x_{2}^{m}}),m,n=1,2,\cdots,C \tag{8}\]  
where \(\overline{x_{1}^{m}}\) and \(\overline{x_{2}^{m}}\) are the \(m\)-th and the \(n\)-th columns of the matrices \(\overline{\mathbf{X}_{1}}\) and \(\overline{\mathbf{X}_{2}}\). Given the correlation matrix, \(\mathbf{D}_{1}\) is formed as  
\[\mathbf{D}_{1}=\begin{pmatrix}a_{1}&&\\ &a_{2}&&\\ &&\ddots&\\ &&&a_{C}\end{pmatrix}, \tag{9}\]  
where the diagonal element \(a_{m}\) is calculated as  
\[a_{m}=\frac{\sum_{n=1}^{C}|r_{mm}|}{C},m,n=1,2,\cdots,C. \tag{10}\]  
It should be noted that \(|*|\) is the absolute operation. Next, \(\mathbf{D}_{2}\) is calculated as  
\[\mathbf{D}_{2}=\begin{pmatrix}b_{1}&&\\ &b_{2}&&\\ &&\ddots&\\ &&&b_{C}\end{pmatrix}, \tag{11}\]  
where \(b_{n}\) is obtained following  
\[b_{n}=\frac{\sum_{m=1}^{C}|r_{mm}|}{C},m,n=1,2,\cdots,C. \tag{12}\]Therefore, the Lagrange multiplier method is adopted to solve Equation (4):  
\[L_{1}(\lambda,\mathbf{w})=\mathbf{w}^{T}\mathbf{V}_{1}\mathbf{w}-\lambda[\mathbf{ w}^{T}(\mathbf{V}_{2}+\alpha\mathbf{D}_{1})\mathbf{w}-1]. \tag{13}\]  
Similar to Equation (3), the derivative in the following equation is equal to 0:  
\[\begin{split}\frac{\partial L_{1}}{\partial\mathbf{w}}& =2\mathbf{w}^{T}\mathbf{V}_{1}-2\lambda\mathbf{w}^{T}(\mathbf{V}_ {2}+\alpha\mathbf{D}_{1})=0\\ &\Leftrightarrow\mathbf{V}_{1}\mathbf{w}=\lambda(\mathbf{V}_{2}+ \alpha\mathbf{D}_{1})\mathbf{w}\\ &\Leftrightarrow(\mathbf{V}_{2}+\alpha\mathbf{D}_{1})^{-1} \mathbf{V}_{1}\mathbf{w}=\lambda\mathbf{w}\end{split}. \tag{14}\]  
The target filters are the eigenvectors corresponding to the largest eigenvalues of matrix \(\mathbf{M}_{1}=(\mathbf{V}_{2}+\alpha\mathbf{D}_{1})^{-1}\mathbf{V}_{1}\). For the objective function  
\[J_{2}(w)=\frac{\mathbf{w}^{T}\mathbf{V}_{2}\mathbf{w}}{\mathbf{w}^{T}\mathbf{ V}_{1}\mathbf{w}+\alpha\mathbf{P}_{2}(\mathbf{w})}, \tag{15}\]  
where  
\[\mathbf{P}_{2}(\mathbf{w})=\mathbf{w}^{T}\mathbf{D}_{2}\mathbf{w}, \tag{16}\]  
the spatial filters are solved following a similar process. Finally, the filters are the eigenvectors corresponding to the largest eigenvalues of matrix \(\mathbf{M}_{2}=(\mathbf{V}_{1}+\alpha\mathbf{D}_{2})^{-1}\mathbf{V}_{2}\).  
In this study, the original CCSP is extended into 3 versions using different correlation coefficients, including Pearson's linear correlation coefficient (P-CC), Kendall's correlation coefficient (K-CC), and Spearman's correlation coefficient (S-CC). And the effectiveness of the 3 proposed CCSPs is compared.