## 4 Materials and Methods
### Embraced Pipeline  
The adopted pipeline integrates both ER-EEG and MI-EEG, as illustrated in Figure 2. This study utilizes 24 Jupyter Notebooks adopting six distinct feature sets and four classifiers. Each classifier-feature set combination is applied across nine subjects, with four classes (left hand, right hand, foot, and tongue) considered for analysis. The classifiers implemented are SVM with rbf kernel (GSVM), CART regression tree, LinearSVM, and SVM with a polynomial kernel. These were taken from [7; 14].  
This section introduces a detailed justification of the preprocessing steps, the feature extraction methods' relevance, and the justification for classifier selection.  
Figure 1: The timing diagram for the motor imagery tasks.  
The preprocessing pipeline begins with a notch filter [23] to remove powerline noise, which is a prevalent artifact in EEG signals. Removing this interference early in the sequence prevents the latter from affecting subsequent filtering and spatial transformations. A high-pass filter [24] follows the notch filter to remove the low-frequency drifts from the signal, which helps stabilize the baseline by removing unneeded fluctuations. To reduce common noise, a CAR montage [25] is applied to improve the signal-to-noise ratio factor. We included the initial reference channel in the CAR computation, ensuring the preservation of the data's full rank [35]. To verify this, the calculation of the rank of the EEG data before and after applying the CAR montage was applied, and we found that the rank remained unchanged. The next preprocessing stage is the implementation of the common spatial pattern (CSP) [36] to identify the filters that maximize variance between different motor imagery tasks. Following CSP, spatial filtering [37] is applied to highlight any task-relevant regions in the EEG signals. Lastly, a band-pass filter [38] is applied at the end of the preprocessing pipeline to focus on the main specific rhythms.  
Figure 2: The embraced ER/MI hybrid pipeline.  
Regarding the relevance of feature extraction techniques, the statistical features [26] capture basic distribution properties of the EEG signal, such as mean, variance, skewness, and kurtosis. In MI tasks, the latter provide information about the amplitude changes and its variability. Wavelet analysis [27] provides a time-frequency decomposition of the EEG signal, enabling the detection of momentary task-related patterns. Higher-order spectra (HOS) [28] features capture non-linear interactions in the EEG signal by analyzing higher-order statistics like skewness and kurtosis of the power spectral density. Hjorth [29; 30] parameters, such as activity, mobility, and complexity, summarize the EEG signal's structure, capturing both amplitude and frequency characteristics. Fractal dimensions (Katz, Higuchi, Petrosian) [11; 12; 13] measure the EEG signal's complexity and self-similarity, which can benefit MI tasks by capturing the varying structural complexity inherent in motor imagery. Lastly, the combined feature set integrates statistical, wavelet, Hjorth, HOS, and fractal dimension features to offer a full representation of the EEG signals. This combination introduces noise but still increases the chances of capturing meaningful patterns across different aspects of the EEG signals in the study.  
The four classifiers used, LinearSVM, CART, GSVM, and SVM with a polynomial kernel, were selected to provide a detailed comparison of both linear and non-linear approaches to EEG classification. LinearSVM was chosen because it is well-known for handling high-dimensional data effectively, as supported by EEG studies [33]. CART, a decision tree method, provides flexible decision making for non-linear patterns but can sometimes be overfitted with highly dimensional EEG features [32]. GSVM [31] and polynomial SVM [33] build on SVM's strengths by capturing non-linear relationships, making them useful for modeling complex connections between EEG channels.