Interpretable Random Forest for Sleep Health Prediction: A Data-Driven Approach to Machine Learning
Abstract
This study aims to develop an interpretable machine learning framework for predicting sleep health conditions by integrating supervised classification with unsupervised pattern discovery. The work addresses gaps in prior research that focuses primarily on accuracy without examining underlying data structure and interpretability. The contribution is a combined workflow that uses Random Forest classification together with K-Means clustering and Frequent Pattern Growth association rule mining to predict and explain sleep disorder categories. The methodology uses the public Sleep Health and Lifestyle dataset comprising 374 records with demographic, physiological, and lifestyle attributes. Preprocessing included removal of duplicate entries, exclusion of identifier attributes, splitting of blood pressure strings into systolic and diastolic components, encoding of categorical variables, and stratified partitioning into training and testing sets. Classification performance of Random Forest was compared with Decision Tree, Naive Bayes, and K-Nearest Neighbor using confusion matrix derived metrics. Clustering quality was assessed using Davies-Bouldin Index across candidate cluster numbers, and association rules were evaluated by support, confidence, and lift. The outcomes show that the Random Forest model has performed better than the other three models, with accuracy of 90.62% (micro-average: 90.64%), as compared to Decision Trees (89.79%), K-NN (89.00%), and Naive Bayes (88.47%). The Random Forest model achieved a micro-average accuracy of 90.64%, with per-class precision and recall. Predictive importance analysis identified body mass index category, blood pressure, and heart rate among the most influential predictors for distinguishing among normal sleep, insomnia, and sleep apnea, interpreted as predictive contribution rather than causal evidence. Clustering revealed five distinct lifestyle-physiological groups, and association analysis uncovered relationships such as overweight and elevated blood pressure co-occurring with sleep apnea. The findings suggest potential for interpretable ensemble methods to support early risk stratification, while highlighting need for larger clinically validated cohorts, objective sleep measures, and robust cross-validation before clinical deployment.
Keywords
Full Text:
PDFReferences
C. Francavilla, S. Bindlish, B. Shetye, and M. Censani, "Obesity and Cardiovascular Disease: An Obesity Medicine Association (OMA) Clinical Practice Statement (CPS) 2026," Obesity Pillars, vol. 18, Art. no. 100283, 2026, doi: 10.1016/j.obpill.2026.100283
A. Martín-Rodríguez and N. González-Prieto, "Influence of physical activity on perceived stress and mental health in university students: A systematic review," Frontiers in Sports and Active Living, vol. 7, Art. no. 1710832, Jan. 2026, doi: 10.3389/fspor.2025.1710832
L. L. Seow, M. A. F. Mendoza, F. M. Tadjoedin, S.-W. Feng, P. Pongprueksa, L. V. Truong, L. G. R. de Castro, Y. Y. A. Lee, V. Garg, M. Adiatman, and L. G. Do, "Integrated Strategies for Early Diagnosis and Prevention of Oral Diseases in Asia Pacific," International Journal of Environmental Research and Public Health, vol. 22, no. 11, Art. no. 1737, 2025, doi: 10.3390/ijerph22111737
D. Fernandes Prabhu, V. Gurupur, A. Stone, and E. Trader, "Integrating Artificial Intelligence, Electronic Health Records, and Wearables for Predictive, Patient-Centered Decision Support in Healthcare," Healthcare, vol. 13, no. 21, Art. no. 2753, Oct. 2025, doi: 10.3390/healthcare13212753
A. Mohamed, M. Abdelrehim, and R. Al-Barazie, "Context matters in machine learning based disease prediction with insights from diverse clinical and symptom data," Scientific Reports, vol. 15, no. 1, Art. no. 42669, Nov. 2025, doi: 10.1038/s41598-025-26855-8
M. Ricci, A. Devecchi, R. Migliavada, M. Piochi, and L. Torri, "Effect of Demographic Characteristics and Personality Traits on Eating Patterns in the Context of Dietary Intervention: The EATMED Case Study," International Journal of Environmental Research and Public Health, vol. 22, no. 7, Art. no. 1095, 2025, doi: 10.3390/ijerph22071095
A. Raţiu and E.-L. Pop, "Machine Learning in Clinical Decision Making: Applications, Data Limitations and Multidisciplinary Perspectives," Applied Sciences, vol. 16, no. 2, Art. no. 785, 2026, doi: 10.3390/app16020785
Z. M. Hein, C. M. N. Che Mohd Nassir, H. Abdul Hamid, M. F. I. L. Abdullah, and N. Shantakumari, "The Prevalence of Sleep Disorders in Populations with Glymphatic Dysfunction: A Systematic Review and Meta-Analysis," Biology, vol. 15, no. 4, Art. no. 309, 2026, doi: 10.3390/biology15040309
H. P. Susanto, Wella, and F. Natalia, "Systematic Literature Review: Predicting Sleep Disorders with Machine Learning," International Journal on Advanced Science, Engineering and Information Technology, vol. 16, no. 2, pp. 619–630, Apr. 2026, doi: 10.18517/ijaseit.16.2.20726
E. Y. M. Smadi, "The Relationship Between Risk Factors of Lifestyle and Sleep Disorders and Its Impact on Sustainable Development," Journal of Lifestyle and SDGs Review, vol. 5, no. 2, Art. no. e03697, Jan. 2025, doi: 10.47172/2965-730X.SDGsReview.v5.n02.pe03697
M. S. Miralam, "Towards Developing an AI Random Forest Model Approach Adopted for Sustainable Food Supply Chain under Big Data," Journal of Applied Data Sciences, vol. 6, no. 2, pp. 1252–1263, May 2025, doi: 10.47738/jads.v6i2.680
Z. Sun, G. Wang, P. Li, H. Wang, M. Zhang, and X. Liang, "An improved random forest based on the classification accuracy and correlation measurement of decision trees," Expert Systems with Applications, vol. 237, pt. B, Art. no. 121549, 2024, doi: 10.1016/j.eswa.2023.121549
J. Chen, L. Q. R. Ooi, T. W. K. Tan, S. Zhang, J. Li, C. L. Asplund, S. B. Eickhoff, D. Bzdok, A. J. Holmes, and B. T. T. Yeo, "Relationship between prediction accuracy and feature importance reliability: An empirical and theoretical study," NeuroImage, vol. 274, Art. no. 120115, 2023, doi: 10.1016/j.neuroimage.2023.120115
M. Ahmed, S. Hussain, F. Ali, A. K. Gárate-Escamilla, I. Amaya, G. Ochoa-Ruiz, and J. C. Ortiz-Bayliss, "Summarizing Recent Developments on Autism Spectrum Disorder Detection and Classification Through Machine Learning and Deep Learning Techniques," Applied Sciences, vol. 15, no. 14, Art. no. 8056, 2025, doi: 10.3390/app15148056
S. Sivakumar and S. Venkataraman, "Evaluating Machine Learning Approaches: A Comparative Study of Random Forest and Neural Networks in Grade Classification," Indonesian Journal of Data and Science, vol. 6, no. 1, pp. 73–81, 2025, doi: 10.56705/ijodas.v6i1.240
E. J. Ijatuyi, A. Lamm, K. Yessoufou, T. Suinyuy, and H. O. Patrick, "Integration of indigenous knowledge with scientific knowledge: A systematic review," Environmental Science & Policy, vol. 170, Art. no. 104119, 2025, doi: 10.1016/j.envsci.2025.104119
P. Koukaras and C. Tjortjis, "Data Preprocessing and Feature Engineering for Data Mining: Techniques, Tools, and Best Practices," AI, vol. 6, no. 10, Art. no. 257, 2025, doi: 10.3390/ai6100257
A. Joshi, D. Guevara, and M. Earles, "Standardizing and Centralizing Datasets for Efficient Training of Agricultural Deep Learning Models," Plant Phenomics, vol. 5, Art. no. 0084, 2023, doi: 10.34133/plantphenomics.0084
S. Hu, B. Chen, and H. Zhao, "Analyzing the effect of physical activity on sleep quality in college students using the chain mediation model," BMC Psychology, vol. 13, Art. no. 1247, 2025, doi: 10.1186/s40359-025-03554-7
J. He, Z. Li, and L. Yin, "An Efficient and Accurate Random Forest Node-Splitting Algorithm Based on Dynamic Bayesian Methods," Machine Learning and Knowledge Extraction, vol. 7, no. 3, Art. no. 70, 2025, doi: 10.3390/make7030070
U. Ekim and M. Koklu, "Classification of Sleep Disorders Using Machine Learning Algorithms," Journal of Technology and System Information, vol. 3, no. 1, pp. 1–17, 2026, doi: 10.47134/jtsi.v3i1.5346
J. Santos-Pereira, L. Gruenwald, and J. Bernardino, "Top data mining tools for the healthcare industry," Journal of King Saud University – Computer and Information Sciences, vol. 34, no. 8, pt. A, pp. 4968–4982, 2022, doi: 10.1016/j.jksuci.2021.06.002
M. L. Kolling, L. B. Furstenau, M. K. Sott, B. Rabaioli, P. H. Ulmi, N. L. Bragazzi, and L. P. C. Tedesco, "Data Mining in Healthcare: Applying Strategic Intelligence Techniques to Depict 25 Years of Research Development," International Journal of Environmental Research and Public Health, vol. 18, no. 6, Art. no. 3099, Mar. 2021, doi: 10.3390/ijerph18063099
Zhou, J., Liu, Y., Yue, C., Wang, M., Chen, K., & Rosales, K. P. (2026). The Effect of Sleep Quality on Academic Performance: A Systematic Review and Meta-Analysis Study. Behavioral Sciences, 16(5), 634. doi: 10.3390/bs16050634
K. Maharana, S. Mondal, and B. Nemade, "A review: Data pre-processing and data augmentation techniques," Global Transitions Proceedings, vol. 3, no. 1, pp. 91–99, 2022, doi: 10.1016/j.gltp.2022.04.020
A. F. Aysan, B. S. Ciftler, and I. M. Unal, "Predictive Power of Random Forests in Analyzing Risk Management in Islamic Banking," Journal of Risk and Financial Management, vol. 17, no. 3, Art. no. 104, 2024, doi: 10.3390/jrfm17030104
D. D. Solomon, S. Khan, S. Garg, G. Gupta, A. Almjally, B. I. Alabduallah, H. S. Alsagri, M. M. Ibrahim, and A. M. A. Abdallah, "Hybrid Majority Voting: Prediction and Classification Model for Obesity," Diagnostics, vol. 13, no. 15, Art. no. 2610, 2023, doi: 10.3390/diagnostics13152610
C. X. Gao, D. Dwyer, Y. Zhu, C. L. Smith, L. Du, K. M. Filia, J. Bayer, J. M. Menssink, T. Wang, C. Bergmeir, S. Wood, and S. M. Cotton, "An overview of clustering methods with guidelines for application in mental health research," Psychiatry Research, vol. 327, Art. no. 115265, 2023, doi: 10.1016/j.psychres.2023.115265
M. Shawkat, M. Badawi, S. El-Ghamrawy, R. Arnous, and A. El-Desoky, "An optimized FP-growth algorithm for discovery of association rules," The Journal of Supercomputing, vol. 78, no. 4, pp. 5479–5506, 2022, doi: 10.1007/s11227-021-04066-y
A. Vanacore, M. S. Pellegrino, and A. Ciardiello, "Fair evaluation of classifier predictive performance based on binary confusion matrix," Computational Statistics, vol. 39, no. 1, pp. 363–383, 2024, doi: 10.1007/s00180-022-01301-9
J. Sadaiyandi, P. Arumugam, A. K. Sangaiah, and C. Zhang, "Stratified Sampling-Based Deep Learning Approach to Increase Prediction Accuracy of Unbalanced Dataset," Electronics, vol. 12, no. 21, Art. no. 4423, 2023, doi: 10.3390/electronics12214423
M. Conciatori, A. Valletta, and A. Segalini, "Improving the quality evaluation process of machine learning algorithms applied to landslide time series analysis," Computers & Geosciences, vol. 184, Art. no. 105531, 2024, doi: 10.1016/j.cageo.2024.105531
E. D. Madyatmadja, D. J. M. Sembiring, S. M. B. P. Angin, D. Ferdy, and J. F. Andry, ‘Big Data in Educational Institutions using RapidMiner to Predict Learning Effectiveness’, J. Comput. Sci., vol. 17, no. 4, pp. 403–413, Apr. 2021, doi: 10.3844/jcssp.2021.403.413
A. Battisha, A. Kahlon, and D. K. Kalra, "Sleep-Disordered Breathing and Hypertension—A Systematic Review," Journal of Clinical Medicine, vol. 14, no. 9, Art. no. 3115, 2025, doi: 10.3390/jcm14093115
H. E. Bays, C. Varney, L. Alexander, J. Ng, J. Tondt, C. Weber, S. Christensen, K. Burridge, C. Francavilla, S. Bindlish, B. Shetye, and M. Censani, "Obesity and Cardiovascular Disease: An Obesity Medicine Association (OMA) Clinical Practice Statement (CPS) 2026," Obesity Pillars, vol. 18, Art. no. 100283, 2026, doi: 10.1016/j.obpill.2026.100283
A. M. Ikotun, F. Habyarimana, and A. E. Ezugwu, "Cluster validity indices for automatic clustering: A comprehensive review," Heliyon, vol. 11, no. 2, Art. no. e41953, 2025, doi: 10.1016/j.heliyon.2025.e41953
T. Agouti, "Graph-based modeling using association rule mining to detect influential users in social networks," Expert Systems with Applications, vol. 202, Art. no. 117436, 2022, doi: 10.1016/j.eswa.2022.117436
M. U. Bhatti, A. Saeed, M. Ashir, N. Hussain, M. Anwar, and M. F. Ullah, "Modeling Sleep Health and Lifestyle Using Supervised Learning Algorithms," Journal of Computing & Biomedical Informatics, vol. 9, no. 1, 2025, link: https://www.jcbi.org/index.php/Main/article/view/998
R. Alazaidah, G. Samara, M. Aljaidi, M. Haj Qasem, A. Alsarhan, and M. Alshammari, "Potential of Machine Learning for Predicting Sleep Disorders: A Comprehensive Analysis of Regression and Classification Models," Diagnostics, vol. 14, no. 1, Art. no. 27, Jan. 2024, doi: 10.3390/diagnostics14010027
A. Kalkanis, T. Panou, K. Archontogeorgis, and P. Steiropoulos, "The Natural History of Obstructive Sleep Apnea: A Scoping Review," Healthcare, vol. 14, no. 3, Art. no. 325, Jan. 2026, doi: 10.3390/healthcare14030325
H. T. K. Chi, A. Dabbs-Brown, A. Jurek-Loughrey, et al., "Obstructive Sleep Apnea Prediction: A Comprehensive Review and Comparative Study," Machine Learning, vol. 115, Art. no. 29, 2026, doi: 10.1007/s10994-025-06937-4
Y. M. Geasela, D. Y. Bernanda, J. F. Andry, C. K. Jusuf, S. Winata, Lydia, and S. Everlin, ‘Analysis of Student Mental Health Dataset Using Mining Techniques’, J. Comput. Sci., vol. 20, no. 1, pp. 121–128, Jan. 2024, doi: 10.3844/jcssp.2024.121.128
F. S. Lee, J. F. Andry, K. Christianto, Y. Purnomo, A. Chakir, and L. Noviana, ‘Generation Z Health Trends: Data Mining of Sleep and Lifestyle Patterns’, J. Comput. Sci., vol. 21, no. 9, pp. 2096–2104, Sep. 2025, doi: 10.3844/jcssp.2025.2096.2104
J. F. da Silva, A. H. Germano-Soares, T. V. de Oliveira, L. C. B. Silva, V. C. B. Filho, T. C. de Aguiar Silva, and R. M. Tassitano, "Research using smartwatches for the measurement of physical activity, sedentary behavior, and sleep: A scoping review," International Journal of Medical Informatics, vol. 214, Art. no. 106370, 2026, doi: 10.1016/j.ijmedinf.2026.106370
DOI: https://doi.org/10.47738/jads.v7i4.1605
Refbacks
- There are currently no refbacks.

Journal of Applied Data Sciences
| ISSN | : | 2723-6471 (Online) |
| Publisher | : | Bright Publisher |
| Website | : | http://bright-journal.org/JADS |
| : | taqwa@amikompurwokerto.ac.id (principal contact) | |
| support@bright-journal.org (technical issues) |
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0




.png)