Journal of Electrical Engineering and Computer (JEECOM)
Vol 8, No 2 (2026)

Predicting Sleep Quality Using Hybrid Stacking Ensemble Of Random Forest And Catboost With Shap Interpretability

Baitullah Hakim (Universitas Islam Negeri Maulana Malik Ibrahim, Malang)
Muhammad Faisal (Universitas Islam Negeri Maulana Malik Ibrahim, Malang)
Mochamad Imamudin (Universitas Islam Negeri Maulana Malik Ibrahim, Malang)



Article Info

Publish Date
06 Oct 2026

Abstract

Sleep quality is an important indicator of physical and mental well-being, yet its prediction from lifestyle variables remains challenging because behavioral and physiological factors interact nonlinearly. This study develops a hybrid stacking ensemble that combines Random Forest and CatBoost as base learners and Logistic Regression as the meta-classifier for three-class sleep-quality prediction (Poor, Moderate, Good). The Sleep Health and Lifestyle Dataset contains 374 records, of which only 109 are unique, and is preprocessed through blood-pressure decomposition, derived-feature construction, categorical encoding, and numerical standardization. Models are evaluated with Accuracy, Precision, Recall, F1-Score, and multiclass ROC-AUC under Stratified 10-Fold Cross Validation, both in its standard form and in a duplicate-aware form in which identical records are kept in the same fold. Under the duplicate-aware protocol, Random Forest achieved 97.86% Accuracy, 91.06% macro F1-Score, and 0.9970 ROC-AUC; CatBoost achieved 97.33%, 90.70%, and 0.9930; and Hybrid Stacking achieved 97.06%, 90.51%, and 0.9784. Recall for the minority Poor class (n = 12) was 66.7% for all three models, and stacking did not improve on its base learners. SHAP analysis identifies Stress Level and Sleep Duration as the two dominant features. The results are specific to this small, largely duplicated dataset and do not support clinical use.

Copyrights © 2026






Journal Info

Abbrev

jeecom

Publisher

Subject

Control & Systems Engineering Electrical & Electronics Engineering Energy

Description

Journal of Electrical Engineering and Computer (JEECOM) is published by Engineering Faculty of Nurul Jadid University, Probolinggo, East Java, Indonesia. This journal encompasses research articles, original research report, : 1) Power Systems, 2) Signal, System, and Electronics, 3) Communication ...