A Comprehensive Evaluation of Features and Simple Machine Learning Algorithms for Electroencephalographic-Based Emotion Recognition
Abstract
:1. Introduction
2. Related Work
3. Materials and Methods
3.1. Emotion Recognition Process
3.2. Data Acquisition
- Data matrix: 40 × 40 × 8064, where the first 40 elements represent the total number of videos, the second 40 represent the collection of signals from the total number of channels (32 EEG), and 8064 are the experimental data based on the video and sampling sequence (63 × 128). The first 3 s correspond to the reference data obtained before the experiment. The last 60 s are the information recorded during the experiment.
- Label matrix: 40 × 4, where the number of videos used is represented by 40, and 4 is the number of labels describing the affective dimensions: valence, arousal, dominance, and liking, with scores ranging from 1.0 to 9.0 according to the SAM (Self-Assessment Manikin) scale.
3.3. Feature Extraction Methods
3.3.1. Time Domain
3.3.2. Frequency Domain
3.3.3. Time–Frequency Domain
3.3.4. Location Domain
3.4. Dimensionality Reduction
3.5. Classification Algorithms
3.5.1. Support Vector Machine (SVM)
3.5.2. k-Nearest-Neighbor (k-NN)
3.5.3. Artificial Neural Networks (ANNs)
3.6. Assessment Performance
3.6.1. Accuracy
3.6.2. Confusion Matrix
- total instances = correct instances + incorrect instances;
- correctly classified instance = TP + TN;
- incorrectly classified instance = FP + FN.
4. Implementation and Results
4.1. Selection of Feature Extraction Methods and Classification Algorithms
- Q1. What methods are used for feature extraction in the time, frequency, and time–frequency domains for emotion recognition?
- Q2. Which classification algorithms yield better results in emotion classification?
4.1.1. Feature Extraction Methods
4.1.2. Classification Algorithms
4.2. Feature Extraction Times
4.3. Emotion Classification and Performance Evaluation
- 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, time–frequency, location; time, frequency, time–frequency, location.
Results Using Data from DEAP
5. Discussion
6. Conclusions
- Effectiveness of feature selection: applying feature selection techniques like a correlation matrix to eliminate redundant characteristics generally improved the model’s performance across all domains and algorithms, emphasizing the importance of targeted feature selection.
- The superiority of ANN: ANN consistently outperformed the other machine learning models, particularly in scenarios where features were selected carefully.
- Importance of time–frequency features: features from the time–frequency domain consistently yielded high accuracies across all machine learning algorithms, underlining their relevance for emotion recognition tasks.
- Role of hybrid models: combining features from multiple domains led to the highest-performing models. In particular, a hybrid model employing a mixture of nine time-domain features, seven frequency-domain features, two time–frequency-domain features, and sixteen location-domain features achieved an accuracy of 0.96 with ANN.
- Improvement in location domain: Initially, the location-domain features performed poorly compared to other domains. However, when combined with features of multiple domains, the performance significantly increased, showing the importance of the information provided for spatial features.
- The present study uses relatively simple and computationally inexpensive machine-learning algorithms like SVM, KNN, and ANN. Despite their simplicity, these algorithms could achieve high levels of accuracy. This makes the findings particularly valuable for real-time emotion recognition applications where computational resources and processing time are often limited.
7. Future Work
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Bablani, A.; Edla, D.R.; Tripathi, D.; Cheruku, R. Survey on Brain-Computer Interface: An Emerging Computational Intelligence Paradigm. ACM Comput. Surv. 2019, 52, 1–32. [Google Scholar] [CrossRef]
- Alarcao, S.M.; Fonseca, M.J. Emotions recognition using EEG signals: A survey. IEEE Trans. Affect. Comput. 2019, 10, 374–393. [Google Scholar] [CrossRef]
- Daly, I. Affective Brain–Computer Interfacing and Methods for Affective State Detection. In Brain-Computer Interfaces Handbook: Technological and Theoretical Advances; CRC Press; Taylor & Francis Group: Boca Raton, FL, USA, 2018; pp. 147–164. [Google Scholar] [CrossRef]
- Bhatti, A.M.; Majid, M.; Anwar, S.M.; Khan, B. Human emotion recognition and analysis in response to audio music using brain signals. Comput. Human Behav. 2016, 65, 267–275. [Google Scholar] [CrossRef]
- Chanel, G.; Kronegg, J.; Grandjean, D.; Pun, T. Emotion Assessment: Arousal Evaluation Using EEG’s and Peripheral Physiological Signals. In International Workshop on Multimedia Content Representation, Classification and Security; Springer: Berlin/Heidelberg, Germany, 2006; Volume 4105, pp. 530–537. [Google Scholar] [CrossRef]
- Zheng, W. Multichannel EEG-Based Emotion Recognition via Group Sparse Canonical Correlation Analysis. IEEE Trans. Cogn. Dev. Syst. 2017, 9, 281–290. [Google Scholar] [CrossRef]
- Koelstra, S.; Muhl, C.; Soleymani, M.; Lee, J.-S.; Yazdani, A.; Ebrahimi, T.; Pun, T.; Nijholt, A.; Patras, I. DEAP: A Database for Emotion Analysis using Physiological Signals. 2012. Available online: http://www.eecs.qmul.ac.uk/mmv/datasets/deap/ (accessed on 11 June 2020).
- Torres, E.P.; Torres, E.A.; Hernández-Álvarez, M.; Yoo, S.G. EEG-based BCI emotion recognition: A survey. Sensors 2020, 20, 5083. [Google Scholar] [CrossRef]
- Nawaz, R.; Cheah, K.H.; Nisar, H.; Yap, V.V. Comparison of different feature extraction methods for EEG-based emotion recognition. Biocybern. Biomed. Eng. 2020, 40, 910–926. [Google Scholar] [CrossRef]
- Yin, Z.; Liu, L.; Chen, J.; Zhao, B.; Wang, Y. Locally robust EEG feature selection for individual-independent emotion recognition. Expert Syst. Appl. 2020, 162, 113768. [Google Scholar] [CrossRef]
- Arnau-González, P.; Arevalillo-Herráez, M.; Ramzan, N. Fusing highly dimensional energy and connectivity features to identify affective states from EEG signals. Neurocomputing 2017, 244, 81–89. [Google Scholar] [CrossRef]
- Atkinson, J.; Campos, D. Improving BCI-based emotion recognition by combining EEG feature selection and kernel classifiers. Expert Syst. Appl. 2016, 47, 35–41. [Google Scholar] [CrossRef]
- Khateeb, M.; Anwar, S.M.; Alnowami, M. Multi-Domain Feature Fusion for Emotion Classification Using DEAP Dataset. IEEE Access 2021, 9, 12134–12142. [Google Scholar] [CrossRef]
- Zubair, M.; Yoon, C. EEG based classification of human emotions using discrete wavelet transform. Lect. Notes Electr. Eng. 2017, 450, 21–28. [Google Scholar] [CrossRef]
- Zheng, W.-L.; Zhu, J.-Y.; Lu, B.-L. Identifying stable patterns over time for emotion recognition from eeg. IEEE Trans. Affect. Comput. 2019, 10, 417–429. [Google Scholar] [CrossRef]
- Li, J.; Qiu, S.; Du, C.; Wang, Y.; He, H. Domain adaptation for eeg emotion recognition based on latent representation similarity. IEEE Trans. Cogn. Dev. Syst. 2020, 12, 344–353. [Google Scholar] [CrossRef]
- Jurcak, V.; Tsuzuki, D.; Dan, I. 10/20, 10/10, and 10/5 systems revisited: Their validity as relative head-surface-based positioning systems. Neuroimage 2007, 34, 1600–1611. [Google Scholar] [CrossRef] [PubMed]
- Chen, J.-M.; Chang, P.-C.; Liang, K.-W. Speech Emotion Recognition Based on Joint Self-Assessment Manikins and Emotion Labels. In 2019 IEEE International Symposium on Multimedia (ISM); IEEE: New York, NY, USA, 2019; pp. 327–330. [Google Scholar] [CrossRef]
- Wang, J.; Wang, M. Review of the emotional feature extraction and classification using EEG signals. Cogn. Robot. 2021, 1, 29–40. [Google Scholar] [CrossRef]
- Khosla, A.; Khandnor, P.; Chand, T. A comparative analysis of signal processing and classification methods for different applications based on EEG signals. Biocybern. Biomed. Eng. 2020, 40, 649–690. [Google Scholar] [CrossRef]
- Kurita, T. Principal Component Analysis (PCA). Comput. Vis. 2020, 1–4. [Google Scholar] [CrossRef]
- Santa Cruz, O.; del Mar Ramírez, L.; Trujillo-Romero, F. Técnicas de aprendizaje automático aplicadas a electroencefalogramas. Res. Comput. Sci. 2016, 113, 53–65. [Google Scholar] [CrossRef]
- Doma, V.; Pirouz, M. A comparative analysis of machine learning methods for emotion recognition using EEG and peripheral physiological signals. J. Big Data 2020, 7, 1–21. [Google Scholar] [CrossRef]
- Sun, S.; Huang, R. An adaptive k-nearest neighbor algorithm. In Proceedings of the 2010 Seventh International Conference on Fuzzy Systems and Knowledge Discovery, Yantai, China, 10–12 August 2010; Volume 1, pp. 91–94. [Google Scholar] [CrossRef]
- Dudani, S.A. The Distance-Weighted k-Nearest-Neighbor Rule. IEEE Trans. Syst. Man Cybern. 1976, SMC-6, 325–327. [Google Scholar] [CrossRef]
- Sokolova, M.; Lapalme, G. A systematic analysis of performance measures for classification tasks. Inf. Process. Manag. 2009, 45, 427–437. [Google Scholar] [CrossRef]
- Moon, S.-E.; Chen, C.-J.; Hsieh, C.-J.; Wang, J.-L.; Lee, J.-S. Emotional EEG classification using connectivity features and convolutional neural networks. Neural Netw. 2020, 132, 96–107. [Google Scholar] [CrossRef]
Method | Mathematical Expression | Description | |
---|---|---|---|
Time domain | |||
Maximum (Max) | () | (1) | is the maximum element of C if any other component of that set is less than or equal to . |
Mean | (2) | In Equations (2)–(6), represent the data (EEG signal), where , and is the total number of samples (experiments). | |
Standard deviation (Stddev) | (3) | ||
Variance (Var) | (4) | ||
Skewness | (5) | ||
Kurtosis | (6) | ||
Mean of absolute values of the first difference of normalized (AFD_N) | (7) | In Equations (7) and (8), represents the data (EEG signal), where , and is the total number of samples (experiments). | |
The mean of absolute values of the second difference of normalized (ASD_N ()) | (8) | ||
Shannon entropy (ShEn) | (9) | represents the EEG signal, is the occurrence probability for the values in and is the total number of experiments. | |
Approximate entropy (ApEn) | (10) | represents the EEG signal, is the size of the vector, is the tolerance value, is the total number of experiments, and is the vector self-similarity. | |
Sample entropy (SampEn) | where | (11) | Self-similarity of the pairs of vectors and with a tolerance of . If the signals are self-similar, then m (r) is high. |
Permutation entropy (PerEn) | where | (12) | when and have the same pattern, else is 0, and the pattern is defined by the order of that corresponds to each element. The occurrence probability of each pattern category is . |
Energy (Eng) | (13) | as , where is the EEG signal. | |
Average power (Avg) | (14) | is the number of samples taken for the computation, and is the EEG signal. | |
Root mean square (EMS) | (15) | is the number of samples taken for the computation, and is the EEG signal. | |
Line length (LinLen) | (16) | is the EEG signal, is the number of samples in the signal, and is the data index. | |
Petrosian fractal dimension (PFD) | (17) | The length of the signal is , and is the number of pairs of segments that are not similar in the binary sequence. | |
Higuchi fractal dimension (HFD) | where and | (18) | is the total number of signals, and y is the normalization correction factor. The average length of k sequences with the same interval as the signal length corresponds to the interval . |
Zero crossing (ZeCr) | where | (19) | The total count of samples present in a block of the EEG signal is represented by , represents the input signal, and is the sign function. |
Higher-order crossing (HOC) | (20) | is the estimation of the number of zero crossings. represents the finite zero-mean series data, is the high-pass filter, and is the high-pass filter sequence. | |
Hjorth parameters (HPs) | (21) | The activity is defined as the variance of the input signal represented by , represents the variance of the first derivative of , represents the variance of the signal, and y is the mobility of the first derivative of . | |
(22) | |||
(23) | |||
Frequency domain | |||
Power ratio (PR) | (24) | It determines power ratios between the current and background epoch in the same frequency range to compare their power levels. Each power ratio is used with different applications for state-of-mind recognition. | |
(25) | |||
(26) | |||
(27) | |||
Spectral entropy (SE) | where | (28) | is the number of values for the EEG signal. The denominator represents the maximum uniformly distributed noise, and is a function of the occurrence probability . |
Power spectral density (PSD) | (29) | represents the given EEG signal by the following time average, where is centered at some arbitrary point . | |
Fast Fourier transform (FFT) | (30) | , is the number of samples in the signal, and x(n) represents the input EEG signal, with . | |
Time–frequency domain | |||
Discrete wavelet transform (DWT) | (31) | of any signal in the time domain ; and are the scale parameter and the shift parameter. | |
Wavelet entropy (WEnt) | (32) | is the wavelet energy based on a value l, l is the level of wavelet entropy, is the square of the vector elements, and is the number of the wavelet decomposition. | |
Location domain (LD) | |||
Rational asymmetry (RASM) and differential asymmetry (DASM) | (33) | and represent the power of the electrodes in the left and right hemispheres of the brain. | |
(34) |
Labels | Prediction | |
---|---|---|
Negative (0) | Positive (1) | |
Negative (0) | TN | FP |
Positive (1) | FN | TP |
Description | DEAP Dataset |
---|---|
EEG devise | Biosemi ActiveTwo |
Number of channels | 32 for EEG, 8 physiological signals |
Sampling | Original 512 Hz, downsampled samples of 128 Hz |
Number of subjects | 32 |
Stimulus | 40 musical videos (one minute each) |
Emotions | Valence, arousal, dominance, and liking (scale from 1 to 9, familiarity from 1 to 5) |
Features | 1 Channel (s) | 1 Trial 32 Channels (s) | 40 Trials 32 Channels (s) |
---|---|---|---|
Statistical | 0.055000 | 1.760 | 70.40 |
Additional | 0.220964 | 5.974 | 23.935 |
Frequency domain | 1.114581 | 35.667 | 1426.68 |
Frequency–time domain | 0.047963 | 1.535 | 61.40 |
Shannon entropy method | 0.272020 | 8.705 | 348.20 |
Approximate entropy | 3.471318 | 111.082 | 4443.28 |
Sampling entropy | 3.368673 | 107.798 | 4311.92 |
Permutation entropy | 0.061990 | 1.984 | 79.36 |
Domain | Number of Features | Accuracy | ||
---|---|---|---|---|
SVM | KNN | ANN | ||
Time domain | 21 | 0.70 | 0.71 | 0.76 |
Selected 9 | 0.75 | 0.78 | 0.80 | |
Frequency domain | 11 (included 5 bands) | 0.80 | 0.77 | 0.82 |
7 (included 5 bands) | 0.81 | 0.81 | 0.88 | |
Time–frequency domain | 2 | 0.86 | 0.83 | 0.90 |
Location domain | 16 pairs for 32 channels for DASM and 16 pairs for 32 channels for RASM | 0.60 | 0.62 | 0.75 |
Selected 16 pairs for 32 channels for DASM | 0.64 | 0.64 | 0.81 | |
Hybrid (combination of selected features in the domains) | 9 time + 7 frequency | 0.87 | 0.82 | 0.95 |
9 time + 2 time–frequency | 0.78 | 0.82 | 0.89 | |
9 time + 16 location | 0.70 | 0.74 | 0.86 | |
3 frequency + 2 time–Frequency | 0.81 | 0.80 | 0.90 | |
3 frequency + 16 location | 0.74 | 0.7 | 0.92 | |
9 time + 7 frequency + 2 time–frequency | 0.81 | 0.83 | 0.94 | |
9 time + 7 frequency + 16 location | 0.80 | 0.80 | 0.93 | |
7 frequency + 2 time–frequency + 16 location | 0.75 | 0.76 | 0.91 | |
9 time + 7 frequency + 2 time–frequency + 16 location | 0.82 | 0.83 | 0.96 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Álvarez-Jiménez, M.; Calle-Jimenez, T.; Hernández-Álvarez, M. A Comprehensive Evaluation of Features and Simple Machine Learning Algorithms for Electroencephalographic-Based Emotion Recognition. Appl. Sci. 2024, 14, 2228. https://doi.org/10.3390/app14062228
Álvarez-Jiménez M, Calle-Jimenez T, Hernández-Álvarez M. A Comprehensive Evaluation of Features and Simple Machine Learning Algorithms for Electroencephalographic-Based Emotion Recognition. Applied Sciences. 2024; 14(6):2228. https://doi.org/10.3390/app14062228
Chicago/Turabian StyleÁlvarez-Jiménez, Mayra, Tania Calle-Jimenez, and Myriam Hernández-Álvarez. 2024. "A Comprehensive Evaluation of Features and Simple Machine Learning Algorithms for Electroencephalographic-Based Emotion Recognition" Applied Sciences 14, no. 6: 2228. https://doi.org/10.3390/app14062228
APA StyleÁlvarez-Jiménez, M., Calle-Jimenez, T., & Hernández-Álvarez, M. (2024). A Comprehensive Evaluation of Features and Simple Machine Learning Algorithms for Electroencephalographic-Based Emotion Recognition. Applied Sciences, 14(6), 2228. https://doi.org/10.3390/app14062228