PERBANDINGAN DECISION TREE DAN K-NEAREST NEIGHBOR UNTUK KLASIFIKASI KATEGORI UTANG TIDUR BERDASARKAN PENGGUNAAN SMARTPHONE

Authors

  • Zaehol Fatah Universitas Ibrahimy Situbondo
  • Musthofa Ali Rofi'i Universitas Ibrahimy

DOI:

https://doi.org/10.70248/jrsit.v4i2.4965

Keywords:

Decision Tree, K-Nearest Neighbor, Klasifikasi, Penggunaan Smartphone, Utang Tidur, Sleep Debt, Kebocoran Data.

Abstract

Penggunaan smartphone menjelang tidur berkaitan dengan risiko defisit tidur. Penelitian ini membandingkan Decision Tree dan K-Nearest Neighbor (K-NN) untuk mengklasifikasikan kategori utang tidur (sleep_debt_category) pada dataset simulasi publik Sleep Debt & Screen Time (berkas bedtime_screentime_sleep_debt.csv; Kaggle; 8.500 baris; 18 atribut) yang terbagi ke dalam empat kelas berurutan: Severe Sleep Debt (647 data; 7,61%), Moderate Debt (4.462 data; 52,49%), Mild Deficit (2.004 data; 23,58%), dan Optimal Recovery (1.387 data; 16,32%). Atribut total_sleep_hours dikeluarkan karena membentuk label. Karena next_day_fatigue_score turut menentukan kelas Severe Sleep Debt, dua skenario diuji: skenario pra-tidur (10 prediktor perilaku smartphone, demografis, dan gaya hidup) dan skenario lengkap (15 prediktor, termasuk lima indikator pasca-tidur yang berpotensi membocorkan label). Evaluasi memakai validasi silang berstrata 10-lipat dan hold-out 80:20 di Altair AI Studio (RapidMiner). Pada skenario pra-tidur, Decision Tree memperoleh accuracy 70,78% ± 0,67% dan macro-F1 64,22%, mengungguli K-NN (62,65% ± 1,30% dan 54,94%). Pada skenario lengkap, Decision Tree mencapai accuracy hold-out 79,64% vs 71,87% (macro-F1 78,12% vs 67,88%; kappa 0,6716 vs 0,5476) serta accuracy validasi silang 83,19% vs 71,69%. Temuan utama menunjukkan bahwa Decision Tree konsisten lebih unggul daripada K-NN bahkan setelah penalaan nilai k dan ablasi atribut demografis pada K-NN, dengan batas pemisahan tersulit pada kelas transisi Mild Deficit.

References

Alnawwar, M. A., Alraddadi, M. I., Algethmi, R. A., Salem, G. A., Salem, M. A., & Alharbi, A. A. (2023). The effect of physical activity on sleep quality and sleep disorder: A systematic review. Cureus, 15(8), e43595. https://doi.org/10.7759/cureus.43595

Alotaibi, M. S., Fox, M., Coman, R., Ratan, Z. A., & Hosseinzadeh, H. (2022). Smartphone addiction prevalence and its association on academic performance, physical health, and mental well-being among university students in Umm Al-Qura University (UQU), Saudi Arabia. International Journal of Environmental Research and Public Health, 19(6), 3710. https://doi.org/10.3390/ijerph19063710

Alshammari, T. S. (2024). Applying machine learning algorithms for the classification of sleep disorders. IEEE Access, 12, 36110–36121. https://doi.org/10.1109/ACCESS.2024.3374408

Ardiansyah, D., Arne, D. Y., & Ningsih, P. (2026). Klasifikasi tingkat kecanduan media sosial mahasiswa menggunakan algoritma KNN. Techno.Com, 25(2), 467–479. https://doi.org/10.62411/tc.v25i2.16145

Bandyopadhyay, A., & Goldstein, C. (2023). Clinical applications of artificial intelligence in sleep medicine: A sleep clinician’s perspective. Sleep and Breathing, 27(1), 39–55. https://doi.org/10.1007/s11325-022-02592-4

Brautsch, L. A. S., Lund, L., Andersen, M. M., Jennum, P. J., Folker, A. P., & Rod, N. H. (2023). Digital media use and sleep in late adolescence and young adulthood: A systematic review. Sleep Medicine Reviews, 68, 101742. https://doi.org/10.1016/j.smrv.2022.101742

Cabello-Solorzano, K., Ortigosa de Araujo, I., Peña, M., Correia, L., & Tallón-Ballesteros, A. J. (2023). The impact of data normalization on the accuracy of machine learning algorithms: A comparative analysis. Lecture Notes in Networks and Systems, 750, 344–353. https://doi.org/10.1007/978-3-031-42536-3_33

Correa-Iriarte, A., Hidalgo-Fuentes, S., & Martí-Vilar, M. (2023). Relationship between problematic smartphone use, sleep quality and bedtime procrastination: A mediation analysis. Behavioral Sciences, 13(10), 839. https://doi.org/10.3390/bs13100839

Costa, V. G., & Pedreira, C. E. (2023). Recent advances in decision trees: An updated survey. Artificial Intelligence Review, 56(5), 4765–4800. https://doi.org/10.1007/s10462-022-10275-5

Dietterich, T. G. (1998). Approximate statistical tests for comparing supervised classification learning algorithms. Neural Computation, 10(7), 1895–1923. https://doi.org/10.1162/089976698300017197

Dwikartika, I., & Fatah, Z. (2024). Analisis kecanduan smartphone pada mahasiswa menggunakan metode K-Nearest Neighbors (K-NN). Jurnal Ilmiah Multidisiplin Ilmu, 1(5), 53–59. https://journal.smartpublisher.id/index.php/jimi/article/view/361

Gardiner, C., Weakley, J., Burke, L. M., Roach, G. D., Sargent, C., Maniar, N., Townshend, A., & Halson, S. L. (2023). The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 69, 101764. https://doi.org/10.1016/j.smrv.2023.101764

Halder, R. K., Uddin, M. N., Uddin, M. A., Aryal, S., & Khraisat, A. (2024). Enhancing K-nearest neighbor algorithm: A comprehensive review and performance analysis of modifications. Journal of Big Data, 11(1), 113. https://doi.org/10.1186/s40537-024-00973-y

Harriz, M. A., & Setiyowati, H. (2023). Komparasi algoritma decision tree dan KNN dalam mengklasifikasi daerah berdasarkan produksi listrik. JIKO (Jurnal Informatika dan Komputer), 7(2), 167–171. https://doi.org/10.26798/jiko.v7i2.787

Hartley, S., Royant-Parola, S., Zayoud, A., Gremy, I., & Matulonga, B. (2022). Do both timing and duration of screen use affect sleep patterns in adolescents? PLoS ONE, 17(10), e0276226. https://doi.org/10.1371/journal.pone.0276226

Hidayat, I. A. (2023). Classification of sleep disorders using Random Forest on Sleep Health and Lifestyle dataset. Journal of Dinda: Data Science, Information Technology, and Data Analytics, 3(2), 71–76. https://doi.org/10.20895/dinda.v3i2.1215

Hjetland, G. J., Skogen, J. C., Hysing, M., Gradisar, M., & Sivertsen, B. (2025). How and when screens are used: Comparing different screen activities and sleep in Norwegian university students. Frontiers in Psychiatry, 16, 1548273. https://doi.org/10.3389/fpsyt.2025.1548273

Höhn, C., Hahn, M. A., Gruber, G., Pletzer, B., Cajochen, C., & Hoedlmoser, K. (2024). Effects of evening smartphone use on sleep and declarative memory consolidation in male adolescents and young adults. Brain Communications, 6(3), fcae173. https://doi.org/10.1093/braincomms/fcae173

Kapoor, S., & Narayanan, A. (2023). Leakage and the reproducibility crisis in machine-learning-based science. Patterns, 4(9), 100804. https://doi.org/10.1016/j.patter.2023.100804

Kwon, S. J., Kim, Y., & Kwak, Y. (2022). Influence of smartphone addiction and poor sleep quality on depression among university students. Healthcare, 10(5), 885. https://doi.org/10.3390/healthcare10050885

Lázaro, M., & Figueiras-Vidal, A. R. (2023). Neural network for ordinal classification of imbalanced data by minimizing a Bayesian cost. Pattern Recognition, 137, 109303. https://doi.org/10.1016/j.patcog.2023.109303

Lestiawan, H., Jatmoko, C., Agustina, F., Sinaga, D., & Erawan, L. (2023). Prediction of sleep disorders based on occupation and lifestyle: Performance comparison of Decision Tree, Random Forest, and Naïve Bayes classifier. Journal of Applied Intelligent System (JAIS), 8(3), 298–309. https://doi.org/10.33633/jais.v8i3.8987

Liebig, L., Balogh, E. B., Birkás, B., Faubl, N., Zelko, E., Gräfe, W., Pieper, S., Gottschall, M., & Riemenschneider, H. (2026). Nighttime screen use, sleep quality, and smartphone addiction symptoms among medical students: An international cross-sectional study. Frontiers in Psychiatry, 17, 1735186. https://doi.org/10.3389/fpsyt.2026.1735186

Mayasari, M., Mulyana, D. I., & Yel, M. B. (2022). Komparasi klasifikasi jenis tanaman rimpang menggunakan Principal Component Analysis, Support Vector Machine, K-Nearest Neighbor dan Decision Tree. Jurnal Teknik Informatika Kaputama (JTIK), 6(2), 644–655. https://jurnal.kaputama.ac.id/index.php/JTIK/article/view/243

Mienye, I. D., & Jere, N. (2024). A survey of decision trees: Concepts, algorithms, and applications. IEEE Access, 12, 86716–86727. https://doi.org/10.1109/ACCESS.2024.3416838

Nadeau, C., & Bengio, Y. (2003). Inference for the generalization error. Machine Learning, 52(3), 239–281. https://doi.org/10.1023/A:1024068626366

Nikolić, A., Bukurov, B., Kocić, I., Vuković, M., Ladjević, N., Vrhovac, M., Pavlović, Z., Grujičić, J., Kisic, D., & Sipetić, S. (2023). Smartphone addiction, sleep quality, depression, anxiety, and stress among medical students. Frontiers in Public Health, 11, 1252371. https://doi.org/10.3389/fpubh.2023.1252371

Rainio, O., Teuho, J., & Klén, R. (2024). Evaluation metrics and statistical tests for machine learning. Scientific Reports, 14(1), 6086. https://doi.org/10.1038/s41598-024-56706-x

Sanjaya, A., Erlangga, N. D., Badrul, M., Mustofa, F., Fernada, M. R. E., Farhat, M. P. M., & Tambunan, C. N. L. (2026). Analisis prediksi kualitas tidur berdasarkan gaya hidup menggunakan metode C4.5. Jurnal Manajamen Informatika Jayakarta, 6(2), 112–118. https://doi.org/10.52362/jmijayakarta.v6i2.2240

Sarker, I. H. (2022). AI-based modeling: Techniques, applications and research issues towards automation, intelligent and smart systems. SN Computer Science, 3(2), 158. https://doi.org/10.1007/s42979-022-01043-x

Septiani, W. D. (2025). Klasifikasi gangguan tidur menggunakan metode Decision Tree dan algoritma genetika. Jurnal Minfo Polgan, 13(2), 2668–2675. https://doi.org/10.33395/jmp.v13i2.14585

Sholeh, M., & Andayati, D. (2022). Data mining model klasifikasi menggunakan K-Nearest Neighbor with normalization for diabetes prediction. Jurnal TeIKa, 12(2), 77–86. https://doi.org/10.36342/teika.v12i02.2912

Silvani, M. I., Werder, R., & Perret, C. (2022). The influence of blue light on sleep, performance and wellbeing in young adults: A systematic review. Frontiers in Physiology, 13, 943108. https://doi.org/10.3389/fphys.2022.943108

Sotarjua, L. M., & Santoso, D. B. (2022). Perbandingan algoritma KNN, Decision Tree, dan Random Forest pada data imbalanced class untuk klasifikasi promosi karyawan. Jurnal INSTEK (Informatika Sains dan Teknologi), 7(2), 192–200. https://doi.org/10.24252/instek.v7i2.31385

Sundelin, T., Landry, S., & Axelsson, J. (2024). Is snoozing losing? Why intermittent morning alarms are used and how they affect sleep, cognition, cortisol, and mood. Journal of Sleep Research, 33(3), e14054. https://doi.org/10.1111/jsr.14054

Syriopoulos, P. K., Kalampalikis, N. G., Kotsiantis, S. B., & Vrahatis, M. N. (2023). kNN classification: A review. Annals of Mathematics and Artificial Intelligence, 91(4), 455–492. https://doi.org/10.1007/s10472-023-09882-x

Talwar, S. (2026). Sleep debt & screen time: Late night phone habits [Data set]. Kaggle. https://www.kaggle.com/datasets/samartalwar/sleep-debt-and-screen-time-late-night-phone-habits

Uddin, S., Haque, I., Lu, H., Moni, M. A., & Gide, E. (2022). Comparative performance analysis of K-nearest neighbour (KNN) algorithm and its different variants for disease prediction. Scientific Reports, 12(1), 6256. https://doi.org/10.1038/s41598-022-10358-x

Villar, A., & de Andrade, C. R. V. (2024). Supervised machine learning algorithms for predicting student dropout and academic success: A comparative study. Discover Artificial Intelligence, 4(1), 2. https://doi.org/10.1007/s44163-023-00079-z

Werner de Vargas, V., Schneider Aranda, J. A., dos Santos Costa, R., da Silva Pereira, P. R., & Victória Barbosa, J. L. (2023). Imbalanced data preprocessing techniques for machine learning: A systematic mapping study. Knowledge and Information Systems, 65(1), 31–57. https://doi.org/10.1007/s10115-022-01772-8

Yulianti, R. W., Budiman, F., & Kurniawan, D. (2025). Analisis perbandingan algoritma K-Nearest Neighbor dan Decision Tree dalam klasifikasi tingkat obesitas. Jurnal Sistem Komputer dan Informatika (JSON), 7(2), 365–374. https://doi.org/10.30865/json.v7i2.9227

Zhang, S. (2022). Challenges in KNN classification. IEEE Transactions on Knowledge and Data Engineering, 34(10), 4663–4675. https://doi.org/10.1109/TKDE.2021.3049250

Zhong, C., Masters, M., Donzella, S. M., Diver, W. R., & Patel, A. V. (2025). Electronic screen use and sleep duration and timing in adults. JAMA Network Open, 8(3), e252493. https://doi.org/10.1001/jamanetworkopen.2025.2493

Downloads

Published

2026-11-27

How to Cite

Zaehol Fatah, & Rofi’i, M. A. (2026). PERBANDINGAN DECISION TREE DAN K-NEAREST NEIGHBOR UNTUK KLASIFIKASI KATEGORI UTANG TIDUR BERDASARKAN PENGGUNAAN SMARTPHONE. Jurnal Rekayasa Sistem Informasi Dan Teknologi, 4(2), 173–187. https://doi.org/10.70248/jrsit.v4i2.4965

Issue

Section

Artikel