# Evaluation of Emotions from Brain Signals on 3D VAD Space via Artificial Intelligence Techniques
## 2 Materials and Methods
### Overall Method and Classification  
The first three seconds of the EEG data from the DEAP dataset are subtracted from the signal, and the remaining one minute signal is used for further operations in this study. The windowing method is used for the segmentation of 60 s EEG signals. The flow chart for EEG signal analysis is given in Figure 3.  
This study is divided into two parts. The flow chart of the overall method is given in Figure 4. The segmentation of EEG signals is studied in the first part. The 30, 20, 15, 10, 5, 3, 2, and 1 s non-overlapping windowing method is used to segment the signals. Here, time in seconds refers to the fact that the 60 s signal will be divided into segments. Windowing separations are titled with segment names, and the 2, 3, 4, 6, 12, 20, 30, and 60 signal pieces correspond to 30, 20, 15, 10, 5, 3, 2, and 1 s windowing, and these correspond to Segments I, II, III, IV, V, VI, VII, and VIII, respectively. For instance, Segment I means that the 60 s EEG signal is divided into 2 segments with 30 s windowing. N means no segmentation is applied to the signal (Section 3.1. Segmentation Pre-Study). In the second part of this study, Segments III, IV, and V, which correspond to 15, 10, and 5 s windowing, are chosen for the 2 class cross-comparisons of the VAD areas (3.2. Cross-Comparisons of 3D VAD emotions, segments, and classes). Figure 4: Flow chart of the overall method. Figure 3: Flow chart for EEG signals analysis. Wavelet Transform is a powerful statistical tool applied to various problems, and it has proven its effectiveness in various areas, such as time-frequency analysis of signals, image processing, denoising and extraction of weak signals, data compression, medical image technology, pattern recognition, speech recognition, fingerprint verification, etc. [18; 19]. The local analysis of a signal is performed using the wavelets in this method. Unlike the Fourier Transform, which uses the time-frequency domain and constant window function, Wavelet Transform uses the time-scale domain and continuously varying window function [20]. Different mother wavelets, such as Harr, Daubechies, etc., can be used in Discrete Wavelet Transform (DWT) [18]. In both parts of this study, DWT is applied to the complete EEG signal as well as to all segments of the signal, and d1, d2, d3, and a3 wavelet coefficients are obtained. A Reverse Biot wavelet is used for the analysis. To form the feature datasets for each signal or segment, the mean, Shannon entropy, variance, harmonic mean, mode, skewness, kurtosis, signal energy, Higuchi fractal dimension, mobility, complexity, LZ complexity, Lyapunov exponent, Hurst exponent, median, peak to peak distance, root mean square, root sum of squares, mean frequency, median frequency, power bandwidth, correlation dimension, mean absolute deviation, and interquartile range attributes are used in this study (24 attributes). They are calculated for all channels for each of the 32 participants and for each of the 40 video pieces. After obtaining the feature datasets, Random Forest, SMO, IBk (1-Manh), FURIA, Bagging, Random Committee, and Random Subspace classifiers are studied and the results, such as accuracy rates (CCI %, F1 scores, and MCC values), are obtained for the data. In all classifications, 10-fold cross-validation is applied to the data. A SMOTE filter is also applied to the data to balance the classes. The oversampling SMOTE method is applied, and synthetic samples are generated for the minority class. All minority classes are converged to the majority class for data balancing. Both filtered and unfiltered results are obtained for the comparison of emotions. We generally compared eight three-dimensional emotion regions in this study: A: happy, joyful, useful, powerful, influential, friendly, excited, and inspired; B: relaxed, leisurely, untroubled, and satisfied; C: disdainful and unconcerned; D: angry, hostile, cruel, insolent, hate, and disgusted; E: impressed, surprised, thankful, and curious; F: protected, humble, and reverent.