# Emotional State Detection Using Electroencephalogram Signals: A Genetic Algorithm Approach
## 4 Discussion  
In this analysis, we developed a GA model based on the nearest center classification method, in order to reduce the data dimensionality from a publicly available EEG signal dataset to classify three emotional states. After reducing the data from 2548 features to only 49 features and reaching an accuracy of 90.19%, three ML classification algorithms (KNN, RF and ANN) were evaluated to classify negative, neutral, and positive emotional states. The results show that the 49 features selected by the GA from the total of 2548 features are sufficient to create ML classification models with, obtaining results of 90.43% and 93.43% and 95.87% for KNN, RF and ANN, respectively, the last one being the most accurate. Table 7 shows a comparison of this study with previous studies of the same database using different methodologies to improve feature selection and emotional state recognition via EEG signals. Although our results present the second highest overall performance, as shown in Table 7, our work uses 14 fewer features than the report [26] which has 2.02 points higher overall performance. This means that in terms of dimensionality reduction our method is still better.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Neg.** & **Neu.** & **Pos.** \\ \hline KNN Sensitivity & 0.8791 & 0.8720 & 0.9857 \\ RF Sensitivity & 0.9942 & 0.8396 & 1.0000 \\ ANN Sensitivity & 0.9765 & 0.9465 & 0.9545 \\ \hline  & Neg. & Neu. & Pos. \\ \hline KNN Specificity & 0.9687 & 0.9969 & 0.9008 \\ RF Specificity & 0.9779 & 1.0000 & 0.9295 \\ ANN Specificity & 0.9697 & 0.9942 & 0.9748 \\ \hline \hline \end{tabular}
\end{table}
Table 6: KNN, RF and ANN model’s sensitivity and specificity for the test data.  
Furthermore, considering Figure 7 (models using the forward selection), it can be observed that with only the first eight features, listed as mean_0_b, mean_0_a, stddev_2_a, stddev_2_b, min_q_7_b, mean_3_b, min_q_7_a and min_q_17_a in the graph, very similar performances close to 90% accuracy could be achieved with only 0.31% of the total 2548 features contained in the database, which is the percentage represented by these eight features. This is a much greater reduction in the dimensionality of data than that previously reported in similar studies.  
Moreover, in order compare our methodology with standard method for feature selection in Python, called sequential feature selection (SFS) [36], an additional experiment was performed. The SFS algorithm starts by selecting an initial set of features and evaluating their predictive power. The algorithm then proceeds iteratively, evaluating the performance of the model with an increasing number of features, adding or removing one feature at a time, until the desired number of features is reached or no further improvement in performance is observed. To compare our proposed feature selection methodology, GALGO, to SFS, the same number of optimal features (49) were set as the parameter for the SFS methodology, and the resulting SFS features were tested with the same ML models as those used in our study. As shown in Table 8, all the overall accuracies of the ML models analyzed with the selected features from the SFS model were below our accuracies, so it can be said that the multi-objective genetic algorithms outperform SFS. For this test, the Python library used was SciKit-Learn, version 0.24 [37].