## 4 Implementation and Results
### Emotion Classification and Performance Evaluation  
One of the objectives of this work is to use different feature vectors to detect and classify emotional states, employing different classification algorithms to evaluate which feature extraction methods provide more information and produce classifiers with a better performance. The data were split into 80% and 20% for training and testing. Then, the data were associated with the previously extracted features to construct the different input vectors for the classifiers. The classification algorithms used are SVM, k-NN, and ANN. An RBF kernel was used in the SVM classifier, and \"auto\" was set as the gamma parameter. In the k-NN classifier, the value of k = 5 was used. These two classifiers were implemented using different functions offered by the sklearn library. The ANN classifier was implemented, assigning 1000 epochs, three layers given the number of quadrants to classify, of which the first two layers are activated with RELU with 64 neurons each layer, and the last output layer has four outputs, its activation function is softmax and, in the compilation, the parameter \"categorical_crossentropy\" and optimizer \"Adam\" [16] are used. The feature vectors for the DEAP dataset were composed of features from one-domain and multi-domain, original and no-correlation-selected attributes, with the following setups:  
* Vector with 21 characteristics in the time domain. * Vector with selected nine features in the time domain. * Vector with 11 characteristics in the frequency domain that includes 5 bands for delta, theta, alpha, beta, and gamma plus PSD ranges. * Vector with selected seven attributes in the frequency domain. * Vector with two characteristics in the time-frequency domain. * Vector with 32 features (DASM and RASM) for the location domain. * Vector with 16 attributes (DASM) chosen in the location domain. * Nine vectors corresponding to the combination of selected multi-domain attributes: time, frequency; time, time-frequency; time, location; frequency, time-frequency; frequency, location; time, frequency, time-frequency; frequency, location; time, frequency, time-frequency, location. We applied cross-validation, given that we are working with features, not raw data. Therefore, the models are simple enough, so that we had a manageable computational load. In Table 5, we present the average accuracy performance using 5-fold cross-validation. \begin{table}
\begin{tabular}{c c c c} \hline
**Features** & **1 Channel (s)** & \
\begin{tabular}{c} **1 Trial** \\ **32 Channels (s)** \\ \end{tabular} &
\begin{tabular}{c} **40 Trials** \\ **32 Channels (s)** \\ \end{tabular} \\ \hline Statistical & 0.055000 & 1.760 & 70.40 \\ \hline Additional & 0.220964 & 5.974 & 23.935 \\ \hline Frequency domain & 1.114581 & 35.667 & 1426.68 \\ \hline Frequency–time domain & 0.047963 & 1.535 & 61.40 \\ \hline Shannon entropy method & 0.272020 & 8.705 & 348.20 \\ \hline Approximate entropy & 3.471318 & 111.082 & 4443.28 \\ \hline Sampling entropy & 3.368673 & 107.798 & 4311.92 \\ \hline Permutation entropy & 0.061990 & 1.984 & 79.36 \\ \hline \end{tabular}
\end{table} 
Table 4: Execution time for feature extraction in the DEAP dataset. We used StratifiedKFold from sklearn.model_selection for the cross-validation process to ensure that each fold was representative of the entire dataset. We modified the training and evaluation loop to iterate over the folds. For each fold, we split the dataset into training and testing sets. Then, we trained and evaluated all models within each fold. Finally, we kept track of the performance metrics for each fold to calculate the average performance after all folds were assessed. In our case, the accuracy results were similar. Results Using Data from DEAP  
It was not necessary to apply methods for balancing data between classes. The input vectors to the classifiers were reduced in dimensionality using a correlation matrix to identify features with redundant information that could add noise to the classifier and result in lower accuracy scores.