Automatic Sleep Stage Classification with Subject-Wise Validation: Comparison of Random Forest, XGBoost, and SVM on the Sleep-EDFx Dataset
DOI:
https://doi.org/10.51473/rcmos.v1i1.2026.2690Palabras clave:
EEG signal processing, machine learning, polysomnography, sleep stagingResumen
This paper presents a reproducible pipeline for automatic classification of sleep stages (Wake W, N1, N2, N3, and REM) using single-channel EEG (Fpz-Cz) from the public Sleep-EDFx dataset (PhysioNet), comprising 100 subjects and 175 recordings from two distinct subsets: Sleep Cassette (SC, 78 healthy subjects, home recordings) and Sleep Telemetry (ST, 22 subjects with mild sleep onset difficulty, placebo nights only). A total of 17 features were extracted per 30-second epoch across two domains: time-domain statistics (mean, variance, standard deviation, skewness, kurtosis, and Hjorth parameters) and frequency-domain features via Welch spectral estimation (absolute and relative power in the Delta, Theta, Alpha, and Beta bands, plus the Delta/Alpha spectral ratio). Three classifiers of fundamentally different algorithmic natures were compared (Random Forest, XGBoost, and Support Vector Machine with RBF kernel) under Leave-One-Group-Out (LOGO) cross-validation, preventing any data leakage between individuals. Experiments were conducted in three scenarios: SC alone, ST alone, and the combined dataset. Random Forest achieved the best overall performance, with Cohen’s Kappa of 0.587 on SC and 0.583 on the combined dataset. The convergence of all three classifiers to a similar Kappa range (0.53 to 0.59) indicates that the performance ceiling is primarily determined by the feature set and the inherent physiological overlap between stages, rather than by the choice of classifier.Descargas
Referencias
[1] A. Weighall and I. Kellar, “Sleep and memory consolidation in healthy, neurotypical children and adults: a summary of systematic reviews and meta-analyses,” Emerging Topics in Life Sciences, vol. 7, no. 5, pp. 513–524, Dec. 2023.
[2] V. Daulatabad et al., “Systematic review: the impact of poor sleep quality on psychological and physical health,” Journal of Heart Valve Disease, vol. 30, pp. 79–85, 2025.
[3] C. Iber, S. Ancoli-Israel, A. Chesson, and S. F. Quan, The AASM Manual for the Scoring of Sleep and Associated Events. Westchester, IL: American Academy of Sleep Medicine, 2007.
[4] Y. J. Lee, J. Y. Lee, J. H. Cho, and J. H. Choi, “Interrater reliability of sleep stage scoring: a meta-analysis,” Journal of Clinical Sleep Medicine, vol. 18, no. 1, pp. 193–202, 2022.
[5] L. Fiorillo, A. Monachino, M. van der Meer, V. Warncke, M. Schmidt, F. Wenz, R. Grun, and F. Faraci, “Bridging AI and clinical practice: Integrating automated sleep scoring algorithm with uncertainty-guided physician review,” arXiv preprint arXiv:2312.14996, 2023.
[6] X. Xu, B. Zhang, T. Xu, and J. Tang, “An effective and interpretable sleep stage classification approach using multi-domain EEG and EOG features,” Bioengineering, vol. 12, no. 3, p. 286, 2025.
[7] R. N. Sekkal, F. Bereksi-Reguig, D. Ruiz-Fernandez, N. Dib, and S. Sekkal, “Automatic sleep stage classification: From classical machine learning methods to deep learning,” Biomedical Signal Processing and Control, vol. 77, p. 103751, 2022.
[8] I. S. Masad, A. Alqudah, and S. Qazan, “Automatic classification of sleep stages using EEG signals and convolutional neural networks,” PLOS ONE, vol. 19, no. 1, p. e0297582, Jan. 2024.
[9] J. F. Van Der Aar, D. A. Van Den Ende, F. B. Van Meulen, and M. M. Van Gilst, “Deep transfer learning for automated single-lead EEG sleep staging with channel and population mismatches,” Frontiers in Physiology, vol. 14, Jan. 2024.
[10] A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff, P. Ch. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley, “PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals,” Circulation, vol. 101, no. 23, pp. e215–e220, 2000.
Descargas
Publicado
Número
Sección
Categorías
Licencia
Derechos de autor 2026 Francisco Hugo César Pereira Vale, Ronaldo Martins da Costa (Autor)

Esta obra está bajo una licencia internacional Creative Commons Atribución 4.0.
Este trabalho está licenciado sob a Licença Creative Commons Atribuição 4.0 Internacional (CC BY 4.0). Isso significa que você tem a liberdade de:
- Compartilhar — copiar e redistribuir o material em qualquer meio ou formato.
- Adaptar — remixar, transformar e construir sobre o material para qualquer propósito, inclusive comercial.
O uso deste material está condicionado à atribuição apropriada ao(s) autor(es) original(is), fornecendo um link para a licença, e indicando se foram feitas alterações. A licença não exige permissão do autor ou da editora, desde que seguidas estas condições.
A logomarca da licença Creative Commons é exibida de maneira permanente no rodapé da revista.
Os direitos autorais do manuscrito podem ser retidos pelos autores sem restrições e solicitados a qualquer momento, mesmo após a publicação na revista.


Revista asociada a ABEC Brasil