Study of the Length of time Window in Emotion Recognition based on EEG Signals




machine learning, electroencephalogram, time window lenght, emotion recognition


The objective of this research is to present a comparative analysis using various lengths of time windows (TW) during emotion recognition, employing machine learning techniques and the portable wireless sensing device EPOC+. In this study, entropy will be utilized as a feature to evaluate the performance of different classifier models across various TW lengths, based on a dataset of EEG signals extracted from individuals during emotional stimulation. Two types of analyses were conducted: between-subjects and within-subjects. Performance measures such as accuracy, area under the curve, and Cohen's Kappa coefficient were compared among five supervised classifier models: K-Nearest Neighbors (KNN), Support Vector Machine (SVM), Logistic Regression (LR), Random Forest (RF), and Decision Trees (DT). The results indicate that, in both analyses, all five models exhibit higher performance in TW ranging from 2 to 15 seconds, with the 10 seconds TW particularly standing out for between-subjects analysis and the 5-second TW for within-subjects; furthermore, TW exceeding 20 seconds are not recommended. These findings provide valuable guidance for selecting TW in EEG signal analysis when studying emotions.


Download data is not yet available.

Author Biographies

Alejandro Jarillo Silva, Universidad de la Sierra Sur, México



Víctor Alberto Gómez Pérez, Universidad de la Sierra Sur, México



Omar Arturo Domínguez Ramírez, Universidad Autónoma del Estado de Hidalgo, México




P. Salovey and J. D. Mayer, “Emotional intelligence. Imagination, cognition and personality,” Imagin. Cogn. Pers., vol. 9, no. 3, pp. 185-211, 1990, doi:

R. W. Picard, “Affective Computing for HCI”, in 8th International Conference on Human-Computer Interaction) on Human-Computer Interaction: Ergonomics and User Interfaces-Volume I - Volume I, 1999, pp. 829-833, doi:

R. Stock-Homburg, “Survey of emotions in human–robot interactions: Perspectives from robotic psychology on 20 years of research,” Int. J. Soc. Robotics, vol. 14, no. 2, pp. 389-411, Mar. 2022, doi:

M. S. Young, K. A. Brookhuis, C. D. Wickens and P. A. Hancock, “State of science: Mental workload in ergonomics,” Ergonomics, vol. 58, no. 1, Dec. 2014, doi:

J. X. Chen, P. W. Zhang, Z. J. Mao, Y. F. Huang, D. M. Jiang, and Y. N. Zhang, “Accurate EEG-Based Emotion Recognition on Combined Features Using Deep Convolutional Neural Networks,” IEEE Access, vol. 7, pp. 44317-44328, Jun. 2019, doi:

C. Qing, R. Qiao, X. Xu, and Y. Cheng, “Interpretable Emotion Recognition Using EEG Signals,” IEEE Access, vol. 7, pp. 94160-94170, Jul. 2019, doi:

M. M. Duville, Y. Pérez, R. Hugues-Gudiño, N. E. Naal-Ruiz, L. M. Alonso-Valerdi, D. I. Ibarra-Zarate, “Systematic Review: Emotion Recognition Based on Electrophysiological Patterns for Emotion Regulation Detection,” Appl. Sci., vol. 13, no. 12, art. no. 6896, Feb. 2023, doi:

C. Pan, C. Shi, H. Mu, J. Li, and X. Gao, “EEG-Based Emotion Recognition Using Logistic Regression with Gaussian Kernel and Laplacian Prior and Investigation of Critical Frequency Bands,” Appl. Sci., vol. 9, no. 2, art. no. 1619, Apr. 2019, doi:

D. Wu, “Online and Offline Domain Adaptation for Reducing BCI Calibration Effort,” IEEE Trans. Hum.-Mach. Syst., vol. 47, no. 4, pp. 550-563, Aug. 2017, doi:

G. Li, D. Ouyang, Y. Yuan, W. Li, Z. Guo, X. Qu, P. Green, “An EEG Data Processing Approach for Emotion Recognition,” IEEE Sens. J., vol. 22, no. 11, pp. 10751-10763, Jun. 2022, doi:

P. Schmidt, A. Reiss, R. Dürichen, and K. Van Laerhoven, “Wearable-Based Affect Recognition—A Review,” Sensors, vol. 19, no. 19, art. no. 4079, Sep. 2019, doi:

J. J. Esqueda Elizondo, L. Jiménez Beristáin, A. Serrano Trujillo, M. Zavala Arce, et al., “Using Machine Learning Algorithms on Electroencephalographic Signals to Assess Engineering Students' Focus While Solving Math Exercises,” Rev. Mex. Ing. Biom., vol. 44, no. 4, pp. 23-37, Nov. 2023, doi:

F. J. Ramírez-Arias, E. E. García-Guerrero, E. Tlelo-Cuautle, et al., “Evaluation of machine learning algorithms for classification of EEG signals,” Technologies, vol. 10, no 4, art. no. 79, Jun. 2022, doi:

M. Zheng and Y. Lin, “A deep transfer learning network with two classifiers based on sample selection for motor imagery brain-computer interface,” Biomed. Signal Process. Control, vol. 89, art. no. 105786, Mar. 2024, doi:

J. J. Esqueda-Elizondo, R. Juárez-Ramírez, O. R. López-Bonilla, E. E. García-Guerrero, et al., “Attention measurement of an autism spectrum disorder user using EEG signals: A case study,” Math. Comput. Appl., vol. 27, no. 2, art. no. 21, Mar. 2022, doi:

Y. Qin, B. Li, W. Wang, X. Shi, H. Wang, and X. Wang, “ETCNet: An EEG-based motor imagery classification model combining efficient channel attention and temporal convolutional network,” Brain Res., vol. 1823, art. no. 148673, Nov. 2023, doi:

J. Li, S. Qiu, C. Du, Y. Wang, and H. He, “Domain Adaptation for EEG Emotion Recognition Based on Latent Representation Similarity,” IEEE Trans, Cogn. Dev. Syst., vol. 12, no. 2, pp. 344-353, Jun. 2020, doi:

Y. -P. Lin, C.-H. Wang, T.P. Jung, T.-L. Wu, S.-K. Jeng, J.-R. Duann, J.-H. Chen, “EEG-Based Emotion Recognition in Music Listening”, IEEE Trans. Biomed. Eng., vol. 57, no. 7, pp. 1798-1806 Jul. 2010, doi:

W.-L. Zheng, B.-N. Dong, and B.-L. Lu, “Multimodal emotion recognition using EEG and eye tracking data,” in 2014 36th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Chicago, IL, USA, 2014, pp. 5040-5043, doi:

N. Zhuang, Y. Zeng, L. Tong, C. Zhang, H. Zhang, and B. Yan, “Emotion recognition from EEG signals using multidimensional information in EMD domain,” Biomed Res. Int., vol. 2017, art. no. 8317357, 2017, doi:

D. Ouyang, Y. Yuan, G. Li, and Z. Guo, “The Effect of Time Window Length on EEG-Based Emotion Recognition,” Sensors, vol. 22, no. 13, art. no. 4939, Jun. 2022, doi:

J. Healey, L. Nachman, S. Subramanian, J. Shahabdeen, and M. Morris, “Out of the Lab and into the Fray: Towards Modeling Emotion in Everyday Life,” in 8th International Conference, Pervasive 2010, P. Floréen, A. Krüger, M. Spasojevic, Eds., Helsinki, Finland 2010, doi:

M. Gjoreski, M. Luštrek, M. Gams, and H. Gjoreski, “Monitoring stress with a wrist device using context,” J. Biomed. Inform., vol. 73, pp. 159-170, Sep. 2017, doi:

R. Alhalaseh and S. Alasasfeh, “Machine-Learning-Based Emotion Recognition System Using EEG Signals,” Computers, vol 9, no 4, art. no. 95, 2020, doi:

K. S. Kamble and J. Sengupta, “Ensemble Machine Learning-Based Affective Computing for Emotion Recognition Using Dual-Decomposed EEG Signals,” IEEE Sens. J., vol. 22, no. 3, pp. 2496-2507, Feb. 2022, doi:

X. Li, D. Song, P. Zhang, Y. Zhang, Y. Hou, and B. Hu, “Exploring EEG Features in Cross-Subject Emotion Recognition,” Front. Neurosci., vol 12, art. no. 162, Mar. 2018, doi: https://doi.or/10.3389/fnins.2018.00162

B. Tripathi and R. K. Sharma, “EEG-Based Emotion Classification in Financial Trading Using Deep Learning: Effects of Risk Control Measures,” Sensors, vol. 23, no. 7, art. no. 3474, Mar. 2023, doi:

M. D. Rinderknecht, O. Lambercy, and R. Gassert, “Enhancing simulations with intra-subject variability for improved psychophysical assessments,” PLoS One, vol. 13, no. 12, art. no. e0209839, Dec. 2018, doi:

A. Jarillo-Silva, V. A. Gomez-Perez, E. A Escotto-Cordova, and O. A. Domínguez-Ramírez, “Emotion Classification form EEG signals using wearable sensors:pilot test,” ECORFAN Journal-Bolivia, vol. 7, no. 12, pp. 1-9, Sep. 2020. [Online]. Available:

K. Kotowski, K. Stapo, J. Leski, and M. Kotas, “Validation of Emotiv EPOC+ for extracting ERP correlates of emotional face processing,” Biocybern. Biomed. Eng., vol. 38, no 4, pp. 773-781, 2018, doi:

F. Mulla, E. Eya, E. Ibrahim, A. Alhaddad, R. Qahwaji, and R. Abd-Alhameed, “Neurological assessment of music therapy on the brain using Emotiv Epoc,” in 2017 Internet Technologies and Applications (ITA), Wrexham, UK, 2017, pp. 259-263, doi:

N. Browarska, A. Kawala-Sterniuk, J. Zygarlicki, M. Podpora, M. Pelc, R. Martinek, and E. J. Gorzelańczyk, “Comparison of smoothing filters influence on quality of data recorded with the emotiv epoc flex brain–computer interface headset during audio stimulation,” Brain Sci., vol. 11, no. 1, art. no. 98, Jan. 2021, doi:

P. R. Patel and R. N. Annavarapu, “EEG-based human emotion recognition using entropy as a feature extraction measure,” Brain Inf., vol 8, art. no. 20, Oct. 2021, doi:

P. Krishnan and S. Yaacob, “Drowsiness detection using band power and log energy entropy features based on EEG signals,” Int. J. Innov. Technol. Explor. Eng, vol 8, no. 10, pp. 830-836, Aug. 2019, doi:

A. B Das and M. I. H. Bhuiyan, “Discrimination and classification of focal and non-focal EEG signals using entropy-based features in the EMD-DWT domain,” Biomed. Signal Process. Control, vol. 29, pp. 11-21, Aug. 2016, doi:

R. Djemal, K. AlSharabi, S. Ibrahim, and A. Alsuwailem, “EEG-Based Computer Aided Diagnosis of Autism Spectrum Disorder Using Wavelet, Entropy, and ANN,” BioMed Res. Int., vol. 2017, no 1, art. no. 9816591, 2017, doi:

S. Koelstra, C. Muhl, M. Soleymani, J.-S. Lee, et al., “DEAP: A Database for Emotion Analysis; Using Physiological Signals,” IEEE Trans. Affect. Comput., vol. 3, no. 1, pp. 18-31, 2012, doi:

A. Bablani, D. Reddy Edla, and S. Dodia, “Classification of EEG Data using k-Nearest Neighbor approach for Concealed Information Test,” Procedia Comput. Sci., vol. 143, pp. 242-249, 2018, doi:

D.-W. Chen, R. Miao, W.-Q. Yang, Y. Liang, H.-H. Chen, L. Huang, C.-J. Deng, N. Han, “A feature extraction method based on differential entropy and linear discriminant analysis for emotion recognition,” Sensors, vol. 19, no. 7, art. no. 1631, Oct. 2019, doi:

S. Babeetha and S. S. Sridhar, “EEG Signal Feature Extraction Using Principal Component Analysis and Power Spectral Entropy for Multiclass Emotion Prediction,” in Fourth International Conference on Image Processing and Capsule Networks, Bangkok, Thailand, 2023, pp. 435-448, doi:

V. Doma and M. Pirouz, “A comparative analysis of machine learning methods for emotion recognition using EEG and peripheral physiological signals,” J. Big Data, vol. 7, art. no. 18, Mar. 2020, doi:




How to Cite

Jarillo Silva, A., Gómez Pérez, V. A., & Domínguez Ramírez, O. A. (2024). Study of the Length of time Window in Emotion Recognition based on EEG Signals. Revista Mexicana De Ingenieria Biomedica, 45(1), 31–42.



Research Articles

Share on:

Dimensions Citation