# A Three-Class Classification of Cognitive Workload Based on EEG Spectral Data
## 3 Data Processing  
Figure 3 presents the procedure of data processing. EEG pre-processing consisted of filtration and artifact correction. The pre-processing was performed in the EEGLab, which is the plugin of Matlab software. The set of notch and high pass filters were used. In order to implement said filters, Butterworth filter of the second order was applied. Firstly, a notch filter was used in order to eliminate the influence of the electrical power circuit, the notch boundaries were set to 45-55 Hz. High-pass filter was used to remove noised signal containing non-stationary signal drift across the recording below 0.53 Hz [58; 59; 60] in addition to the two mentioned filters, low pass filter was also applied, and its cut off frequency was equal to 50 Hz. The described filtering step is a part of standard EEG signal processing pipeline [61]. Secondly, in the preprocessing stage MARA (Multiple Artifact Rejection Algorithm) [62] algorithm available in EEGLab software was also applied. This is a method based on Independent Component Analysis (ICA), where artificial intelligence is applied to choose the components to remove. Artifactual  
Figure 3: The procedure of data processing. ICA-components marked by MARA were revised with ICLabel [63], the other ICA component classification method, also available in EEGLab software. In order to eliminate possible potentials related to movement planning and performing, 200 ms prior to each mouse click were discarded. This procedure was adopted to the stimuli where mouse click was required in order to approve the correct answer. Owing to a high inter-subject diversity of EEG signals, feature extraction is one of the essential steps in evaluating the level of cognitive workload based on EEG signal. In addition to this, it may be noticed that classical Machine Learning models such as SVM, decision trees, or kNN require feature extraction and selection for ensuring sufficient quality of cognitive workload classification [40; 44]. After initial consideration, the Fast Fourier Transform (FFT) method was chosen as the main feature extraction method. This decision was taken due to the fact that FFT is one of the most popular methods of EEG feature extraction [56; 64]. The Hamming window function was also applied. The sampling frequency was equal to 500 Hz. The length of a single stimulus record was 5500 ms, what corresponds to 2750 samples. Hamming window was applied to each stimulus, and afterwards FFT was calculated for the whole window, resulting into 1375 frequency bins with frequency resolution 0.18 Hz/bin. Further procedure included decreasing frequency resolution to 1 Hz. Due to the fact that only components of the frequencies below 30 Hz contain valuable information, the spectrum obtained after the FFT transform was cut to the 0-30 Hz interval. This measure allowed to decrease the number of features down to 570, which was still high. In order to further decrease the feature number, the next step was taken: The power of the frequency components were averaged within the following intervals: Delta(1-3 Hz), theta (4-8 Hz), alpha (8-13 Hz), beta1 (13-20 Hz), and beta2 (20-30 Hz) for 19 electrodes, which led to the total feature number equaling 95. As was shown in a previously published paper [32], the appliance of a log transform positively affects the classification performance, as the distribution of a log-transformed feature becomes closer to the normal distribution, thus eliminating outliers. The data which did not undergo the log-transform procedure were not used in the further analysis. In order to reduce the input dimension number and ensure higher classification accuracy, feature selection was performed. Various ranking methods allowing to arrange the features according to their predictive ability were applied. They included:  
1. ECFS-Feature Selection by Eigenvector Centrality [61],
2. Relief feature selection method [65],
3. Mutilfs--mutual information feature selection method [66],
4. Fisher score feature selection method [67].