## 2 Materials and Methods
### Methods
#### 2.3.1 Related Work  
In transfer learning, features acquired in the source domain can be utilized to enhance the intention detection rate (IDR) in the target domain. Hence, it is highly significant to minimize variations between data distributions of the source and target domain [10]. The manifold feature transfer learning (MMFT) framework [24] is an effective method based on transfer learning. MMFT first performs distribution mean alignment (DMA), whereby all domains are similarly disseminated across the symmetric positive defined (SPD) manifold, using the objective function shown in (1). \[J(A,B)=\min_{A,B}\left(\frac{\sigma_{s}^{2}+\left(A^{T}M_{s}A-B^{T}M_{t}B \right)^{2}}{2\sigma_{t}^{2}}+\frac{\sigma_{s}^{2}+\left(B^{T}M_{t}B-A^{T}M_{s }A\right)^{2}}{2\sigma_{s}^{2}}\right) \tag{1}\]  
where \(A\) and \(B\) are linear transformations; \(M_{s}\) and \(M_{t}\) are the distribution means of source and target domains, respectively; \(\sigma_{s}^{2}\) and \(\sigma_{t}^{2}\) are the deviations of covariance matrices of source and target domains, respectively. The optimal solution of \(A^{T}M_{s}A=B^{T}M_{t}B\) and two feasible solutions, as shown in (2) and (3), are obtained by minimizing the objective function in (1). In this way, the marginal probability distribution shift is minimized across source and target domains, i.e., aligning the distribution means. \[A=M_{s}^{-1/2},B=M_{t}^{-1/2} \tag{2}\]  
\(A\) and \(B\) in (2) can be further used to align the distribution means to every domain's Riemannian center. \[A=M_{t}^{1/2}M_{s}^{-1/2},B=I \tag{3}\]  
where \(I\) is the identity matrix with proper dimension. Using (3), the distribution mean of the target domain, \(M_{t}\), is aligned with the distribution mean of the source domain \(M_{s}\). Figure 2: BCI Competition IV-a experimental paradigm timing scheme. After domain distribution means are aligned, covariance matrices in both source and target domains are computed using (4) and (5). \[\widetilde{P}_{s,i}=M_{s}^{-1/2}P_{s,i}M_{s}^{-1/2} \tag{4}\]  
\[\widetilde{P}_{t,j}=M_{s}^{-1/2}P_{t,j}M_{s}^{-1/2} \tag{5}\]  
where \(P_{s,i}\) is the covariance matrix of the \(i\)-th trial EEG data in a source domain; \(P_{t,j}\) is for the \(j\)-th trial EEG data in the target domain; \(\widetilde{P}_{s,i}\) and \(\widetilde{P}_{t,j}\) are the aligned covariance matrices of source and target domains, respectively. The next phase of the MMFT framework is SPD manifold tangent space feature extraction using (6) and (7)  
\[x_{s,i}=upper\Big{(}\log\Big{(}\widetilde{P}_{s,i}\Big{)}\Big{)}i=1,\dots,n_{s} \tag{6}\]  
\[x_{t,j}=upper\Big{(}\log\Big{(}\widetilde{P}_{t,j}\Big{)}\Big{)}j=1,\dots,n_{t} \tag{7}\]  
where \(n_{s}\) and \(n_{t}\) are the number of trials in a source domain and target domain, respectively; \(x_{s,i}\) and \(x_{t,j}\) represent tangent space features extracted from a source domain and target domain, respectively. Equations (8) and (9) represent extracted feature matrices, whereby both source and target domain tangent space features are denoted by \(X_{s}\) and \(X_{t}\), respectively [10; 24]. \[X_{s}=[x_{s,1}\dots x_{s,n_{s}}] \tag{8}\]  
\[X_{t}=[x_{t,1}\dots x_{t,n_{t}}] \tag{9}\]  
Furthermore, Grassmann manifold feature learning (GFK) is implemented in the third phase of multi-class MMFT. Subsequently, throughout the conversion process on geodesics from the source to the target domain, GFK searches for average stable features [25]. The marginal probability distribution is reduced through GFK, which brings deviations of all covariance matrices closer [26]. Equation (10) represents either learned source or target domain Grassmann manifold features denoted by \(z\), while tangent space features are denoted by \(x\) and geodesic flow is represented by \(\Phi\). \[A=M_{s}^{-1/2},B=M_{t}^{-1/2} \tag{2}\]0  
The inner product of transformed features is obtained via (11).