Analisis Kontribusi Durasi Tidur dalam Klasifikasi Penyakit Kronis Menggunakan Random forest

Authors

  • Boy Sandy Dwi Nugraha.H Universitas Riau
  • Khairul Fajri Ilahi Universitas Riau
  • Khairni Sukmawati Universitas Riau

DOI:

https://doi.org/10.70340/jirsi.v5i3.482

Keywords:

sleep duration, chronic disease classification, Random forest, feature importance, machine learning.

Abstract

This study aims to analyze the relative contribution of sleep duration as one predictor attribute in chronic disease classification using the Random forest algorithm. The secondary dataset was obtained from Kaggle under the name Healthcare Real-Time Risk Dataset and contains 1,000 records and 10 attributes. Seven attributes were used as predictors: age, gender, body mass index (BMI), smoking status, alcohol consumption, physical activity, and sleep duration. The Chronic Disease History label was transformed into two classes: YES, for Diabetes, Heart Disease, and Hypertension, and NO for None. The dataset was divided into 750 training records and 250 testing records using stratified sampling with a 75:25 ratio and random seed 1. The Random forest model used six decision trees, the gain-ratio criterion, a maximum depth of 10, and majority voting. Evaluation on the test set yielded an accuracy of 72.80%, a precision of 77.33% for the YES class, a recall of 91.10% for the YES class, an F1-score of 83.65% for the YES class, a recall of 13.56% for the NO class, an AUC of 0.493, and a Cohen’s kappa of 0.058. Attribute-weight analysis showed that age had the highest weight at 0.243, followed by physical activity at 0.209 and sleep duration at 0.191. These results indicate that sleep duration contributes relatively to the model but is not the highest-weighted attribute. The low recall for the NO class and an AUC close to 0.5 indicate that the model’s ability to distinguish the target classes remains limited. These findings describe classification results for the dataset used and do not establish a causal relationship between sleep duration and chronic diseases.

Downloads

Download data is not yet available.

References

M. Hirshkowitz et al., “National Sleep Foundation’s sleep time duration recommendations: methodology and results summary,” Sleep Health, vol. 1, no. 1, pp. 40–43, 2015, doi: 10.1016/j.sleh.2014.12.010.

J. Li, D. Cao, Y. Huang, Z. Chen, R. Wang, Q. Dong, Q. Wei, and L. Liu, “Sleep duration and health outcomes: an umbrella review,” Sleep and Breathing, vol. 26, no. 3, pp. 1479–1501, 2022, doi: 10.1007/s11325-021-02458-1.

C. Gao, J. Guo, T.-T. Gong, J.-L. Lv, X.-Y. Li, F.-H. Liu, M. Zhang, Y.-T. Shan, Y.-H. Zhao, and Q.-J. Wu, “Sleep Duration/Quality With Health Outcomes: An Umbrella Review of Meta-Analyses of Prospective Studies,” Frontiers in Medicine, vol. 8, article 813943, 2022, doi: 10.3389/fmed.2021.813943.

A. Rachmadina, I. S. Zahra, R. Ritonga, N. A. Pratama, and Y. Nayla, “Hubungan Antara Pola Tidur dan Resiko Penyakit Kronis pada Lansia,” Inovasi Kesehatan Global, vol. 2, no. 1, pp. 87–94, 2025, doi: 10.62383/ikg.v2i1.1270

A. Harisa, S. Syahrul, Y. Yodang, R. Abady, and A. G. Bas, “Analisis Faktor-Faktor yang Memengaruhi Kualitas Tidur Pasien Lanjut Usia dengan Penyakit Kronis,” Jurnal Kesehatan Vokasional, vol. 7, no. 1, pp. 1–10, 2022, doi: 10.22146/jkesvo.62916.

I. Nawawi and Z. Fatah, “Penerapan Decision Trees dalam Mendeteksi Pola Tidur Sehat Berdasarkan Kebiasaan Gaya Hidup,” Jurnal Ilmiah Sains Teknologi dan Informasi, vol. 2, no. 4, pp. 34–41, 2024, doi: 10.59024/jiti.v2i4.969

R. Hidayat, Y. S. Sy, T. Sujana, M. Husnah, H. T. Saputra, and F. Okmayura, “Implementasi Machine Learning untuk Prediksi Penyakit Jantung Menggunakan Algoritma Support Vector Machine,” BIOS: Jurnal Teknologi Informasi dan Rekayasa Komputer, vol. 5, no. 2, pp. 161–168, 2024, doi: 10.37148/bios.v5i2.152.

M. F. Ahmadi and N. F. Abdi, “Klasifikasi Penyakit Ginjal Kronis (CKD) dengan Algoritma KNN dan Decision Tree ID3,” Journal of Informatics and Advanced Computing, vol. 5, no. 2, pp. 8–13, 2024, doi: 10.35814/jiac.v5i2.7189.

A. Fauzi, “Aplikasi Sistem Pakar dengan Metode Naive Bayes untuk Mendeteksi Penyakit Diabetes,” Jurnal Manajemen Informatika (JAMIKA), vol. 15, no. 1, pp. 17–31, 2025, doi: 10.34010/jamika.v15i1.12391.

B. Anggo Seno Aji, Y. Setiawan, and S. D. Anggraini, “Analisis Perbandingan Algoritma Decision Tree, Random forest, dan XGBoost untuk Klasifikasi Penyakit Infeksi Gigi dan Mulut,” INTEGER: Journal of Information Technology, vol. 10, no. 1, pp. 135–148, 2025. Available: https://ejurnal.itats.ac.id/integer/article/view/7501.

W. D. Septiani, “Klasifikasi Gangguan Tidur Menggunakan Metode Decision Tree dan Algoritma Genetika,” Jurnal Minfo Polgan, vol. 13, no. 2, pp. 2668–2675, 2025, doi: 10.33395/jmp.v13i2.14585.

N. Rawal, S. Sharma, P. Prasad, C. Arora, and A. Tripathi, “Machine Learning-Based Stroke Risk Prediction Using RapidMiner,” in 2025 IEEE 7th International Conference on Computing, Communication and Automation (ICCCA), 2025, pp. 1–5, doi: 10.1109/ICCCA66364.2025.11325312.

L. Breiman, “Random forests,” Machine Learning, vol. 45, pp. 5–32, 2001, doi: 10.1023/A:1010933404324.

A. Abburi, “Healthcare Real-Time Risk Dataset,” Kaggle. [Online]. Available: https://www.kaggle.com/datasets/alekhyaabburi/healthcare. Accessed: 19 Oct. 2026.

Republik Indonesia, “Undang-Undang Nomor 13 Tahun 1998 tentang Kesejahteraan Lanjut Usia,” 1998. [Online]. Available: https://peraturan.bpk.go.id/Details/45509/uu-no-13-tahun-1998.

Downloads

Published

2026-09-30