## 2 Methods
### EEG Data
#### 3.2.3 Classification Setup  
Feature Extraction  
Let \(\Psi=\{\mathbf{X}_{n}\in\mathbb{R}^{C\times M}\}_{n=1}^{N}\) be an EEG set holding \(N\) trials from either an MI or a WM dataset, recorded from a single subject, where \(C\) stands for the number of channels and \(M\) corresponds to the number of samples. In addition, let \(\{l_{n}\}_{n=1}^{N}\) be a set whose \(n\)-th element is the label associated with trial \(\mathbf{X}_{n}\). For the MI database \(l_{n}\) can take the values of 1 and 2, corresponding to right hand and left hand motor imagination, respectively. Similarly, for the WM database, \(l_{n}\) can take the values of 1, 2, and 3 corresponding to low,  
Figure 3: (**A**) Schematic representation of the WM protocol. (**B**) EEG channel montage used for the acquisition of the WM database. medium, and high memory loads. In both cases, our goal is to estimate the class label from relevant effective connectivity features extracted from \(\mathbf{X}_{n}\). Because of the results obtained for the simulated data (see Section 4.1 for details), here we consider features from only three approaches for phase-based effective connectivity estimation, namely, \(\text{TE}^{\theta}_{\text{rx}}\), \(\text{GC}^{\theta}\), and PSI. Additionally, we also characterize the data through the real-valued versions of \(\text{TE}_{\kappa a}\) and GC. For the real-valued effective connectivity measures considered, we do the following: let \(\lambda(\mathbf{x}_{c}\rightarrow\mathbf{x}_{c^{\prime}})\) be a measure of effective connectivity between channels \(\mathbf{x}_{c},\mathbf{x}_{c^{\prime}}\in\mathbb{R}^{M}\). By computing \(\lambda(\mathbf{x}_{c}\rightarrow\mathbf{x}_{c^{\prime}})\) for each pairwise combination of channels in \(\mathbf{X}_{n}\) we obtain a connectivity matrix \(\boldsymbol{\Lambda}\in\mathbb{R}^{C\times C}\). In the case when \(c=c^{\prime}\), we set \(\lambda(\mathbf{x}_{c}\rightarrow\mathbf{x}_{c^{\prime}})=0\). Then, we normalize \(\boldsymbol{\Lambda}\) to the range \([0,1]\). After performing the above procedure for the \(N\) trials, we get set of connectivity matrices \(\{\boldsymbol{\Lambda}_{n}\in\mathbb{R}^{C\times C}\}_{n=1}^{N}\). Then, we apply vector concatenation to \(\boldsymbol{\Lambda}_{n}\) to yield a vector \(\boldsymbol{\phi}_{n}\in\mathbb{R}^{1\times(C\times C)}\). Next, we stack the \(N\) vectors \(\boldsymbol{\phi}_{n}\), corresponding to each trial, to obtain a matrix \(\boldsymbol{\Phi}\in\mathbb{R}^{N\times(C\times C)}\) holding all directed interactions, estimated through \(\lambda\), for the EEG set \(\Psi\). A graphical representation of the above-described steps, as well as of our overall classification setup, is depicted in Figure 4.  
For the phase-based effective connectivity measures of interest, we proceed in a similar fashion: let \(\lambda^{\theta}(\mathbf{x}_{c}\rightarrow\mathbf{x}_{c^{\prime}},f)\) be a measure of phase-based effective connectivity between channels \(\mathbf{x}_{c},\mathbf{x}_{c^{\prime}}\) at frequency \(f\). By computing \(\lambda^{\theta}(\mathbf{x}_{c}\rightarrow\mathbf{x}_{c^{\prime}},f)\) for each pairwise combination of channels in \(\mathbf{X}_{n}\) we obtain a connectivity matrix \(\boldsymbol{\Lambda}(f)\in\mathbb{R}^{C\times C}\) (when \(c=c^{\prime}\), we set \(\lambda^{\theta}(\mathbf{x}_{c}\rightarrow\mathbf{x}_{c^{\prime}},f)=0\)). For the MI database, we vary the values of \(f\) in the range from 8 Hz to 18 Hz, in 2 Hz steps, since activity in that frequency range has been associated with MI tasks [43]. Then we define two bandwidths of interest \(\Delta f\in\{\alpha\in[8-12]\), \(\beta_{l}\in[14-18]\}\) Hz. Afterward, we average the matrices \(\boldsymbol{\Lambda}(f)\) within each bandwidth, normalize the resulting matrices to the range \([0,1]\), and stack them together, so that for each trial we have a connectivity matrix \(\boldsymbol{\Lambda}^{\prime}\in\mathbb{R}^{C\times C\times 2}\).