## 2 Motor Imagery Classification Pipelines
### Feature Extraction and Selection  
EEG-based BCIs typically collect data from multiple electrodes placed on the scalp, and each electrode produces a separate time series of measurements. This means that an EEG data set can have hundreds or thousands of dimensions, depending on the number of electrodes used. This gives rise to a common challenge referred to as \"the curse of dimensionality\" ([15]). However, there are techniques that can be used to mitigate the impact of the curse of dimensionality, such as dimensionality reduction through feature extraction. The extracted EEG features are able to capture signal characteristics which can be used as a basis for the differentiation between task-specific brain states.  
During feature extraction, EEG characteristics are extracted from the signals in either the time, frequency and/or space domains. The most common type of EEG feature used in MI is the band power. Band-power (or rhythm) features represent the power of EEG signals for a given frequency band averaged over a time window, and over specific scalp locations [37]. These bands are usually divided into five main frequency ranges: Delta (0.5-4 Hz), Theta (4-8 Hz), Alpha (8-12 Hz), Beta (12-30 Hz), and Gamma (30-100 Hz) [38].  
The simplest frequency domain feature-extraction method is fast Fourier transform (FFT). However, FFT does not take time information into account. An alternative approach is the short-time Fourier transform (STFT), which divides the signal into multiple overlapping frames [36]. Nonetheless, the spectra obtained from FFT over short epochs still have poor resolution when compared to an autoregressive model (AR) [36]. However, the validity of power-spectra estimates depends on the selection of a proper model order. The adaptive autoregressive (AAR) model establishes the parameters of the model [39].  
Nevertheless, FFT and AR provide spectral characteristics of EEG and are not very robust due to the non-stationarity of the EEG signals. In contrast, wavelet transform (WT) uses varying size windows such that high frequencies are evaluated on the shorter window and low frequencies over a longer window contrast [40]. Thus, WT could perform better in the time resolution of high frequencies compared to STFT [37].  
However, we cannot ignore that, in MI BCI, multichannel EEG recordings are used to discriminate the motor imagery patterns. Therefore, feature-extraction and selection methods are important in multichannel EEG in order to further reduce the feature space and improve the accuracy [41], and avoid the loss of crucial data in MI tasks [42].  
For example, the use of the coefficient of determination [43], or \(r^{2}\), can provide a measure for the extent to which a particular EEG feature (i.e., power at a specific frequency and electrode location) is influenced by the subject's mental task (e.g., rest vs. hand movement) [44]. Similarly, the Fisher score is commonly used for determining how strongly a feature (e.g., band power) is correlated with the labels (i.e., motor vs. rest), and in which channel [45]. Moreover, spatial filters have been widely used to extract spatial information from features. The most common method is the common spatial pattern (CSP) filter. CSP generates spatial filters that minimize the variance in one class and maximize the variance in other classes simultaneously [46]. The CSP performance depends on the operational frequency band of EEG [47]. Therefore, several approaches have been proposed to fine tune the subject-specific frequency range for CSP algorithm, such as filter bank common spatial pattern (FBCSP) [33]. Further, within the last few years, several papers in the literature investigated the use of automatic channel-selection methods, including Pearson correlation [48], regularized common spatial pattern with aggregation (RCSPA) [49], and the use of the standard deviation of wavelet coefficients (stdWC) across channels [50].