Evaluation of Machine Learning Models in Predicting Sleep Quality Based on Diet and Physical Activity
DOI:
https://doi.org/10.25077/TEKNOSI.v12i2.2026.213-221Keywords:
Sleep Quality Logistic Regression Gradient Boosting Permutation Feature Importance DietAbstract
Sleep quality is an important indicator of health, shaped by the intricate interactions of various multidimensional elements, including eating habits, physical activity levels, and psychological well-being. The purpose of this study is to assess the efficacy of linear (Logistic Regression) and non-linear machine learning algorithms (Decision Tree and Gradient Boosting) in predicting sleep disorders. The dataset used came from a survey that included 195 participants and underwent several stages of preprocessing, including data cleansing, feature engineering (especially regarding duration), and standardization through Z-score normalization. Model validation is performed using the Stratified 5-Fold Cross-Validation technique to reduce bias and ensure the stability of performance metrics. The findings show that the Logistics Regression model, optimized through threshold adjustment (with an adjustment threshold of 0.55), shows the most favorable and consistent performance, achieving an accuracy rate of 79.5% and a drawback rate of 96.7%, thus surpassing the efficacy of non-linear models such as Gradient Boosting. These results reinforce the principle of simplicity, which states that, in limited datasets, simpler linear models often show greater resilience than their more complex counterparts, which are prone to overfitting. An interpretability assessment conducted through the Analysis of the Importance of Permutation Features showed that bedtime dietary practices and stress levels emerged as the dominant factors affecting sleep quality, surpassing the contribution of physical activity and anthropometric variables (such as height and weight). In light of these findings, this study advocates health interventions that emphasize time-oriented nutrition management (chrononutrition) and recommends the use of linear models as a basic strategy in the screening process for populations characterized by limited sample sizesReferences
D. Freeman, B. Sheaves, F. Waite, A. G. Harvey, and P. J. Harrison, “Sleep disturbance and psychiatric disorders.,” The lancet. Psychiatry, vol. 7, no. 7, pp. 628–637, Jul. 2020, doi: 10.1016/S2215-0366(20)30136-X.
M. R. Irwin, “Why sleep is important for health: a psychoneuroimmunology perspective.,” Annu. Rev. Psychol., vol. 66, pp. 143–172, Jan. 2015, doi: 10.1146/annurev-psych-010213-115205.
I. Clark and H.-P. Landolt, “Coffee, Caffeine, and Sleep: a Systematic Review of Epidemiological Studies and Randomized Controlled Trials,” Sleep Med. Rev., vol. 31, 2017, doi: 10.1016/j.smrv.2016.01.006.
B. J. Krakow, V. A. Ulibarri, B. A. Moore, and N. D. McIver, “Posttraumatic stress disorder and sleep-disordered breathing: a review of comorbidity research,” Sleep Med. Rev., vol. 24, pp. 37–45, 2015, doi: https://doi.org/10.1016/j.smrv.2014.11.001.
M. Scapuccin et al., “Integrating the Divided Nasal Cannula Into Routine Polysomnography to Assess Nasal Cycle: Feasibility and Effect on Outcomes,” J. Clin. Sleep Med., vol. 14, no. 04, pp. 641–650, 2018, doi: 10.5664/jcsm.7062.
D. Cirillo et al., “Sex and gender differences and biases in artificial intelligence for biomedicine and healthcare,” npj Digit. Med., vol. 3, no. 1, p. 81, 2020, doi: 10.1038/s41746-020-0288-5.
A. Rajkomar, J. Dean, and I. Kohane, “Machine Learning in Medicine,” N. Engl. J. Med., vol. 380, no. 14, pp. 1347–1358, 2019, doi: 10.1056/NEJMra1814259.
B. T. Lopes, A. Eliasy, and R. Ambrosio, “Artificial Intelligence in Corneal Diagnosis: Where Are we?,” Curr. Ophthalmol. Rep., vol. 7, no. 3, pp. 204–211, Sep. 2019, doi: 10.1007/s40135-019-00218-9.
S. García, J. Luengo, and F. Herrera, Data Preprocessing in Data Mining, vol. 72. Cham: Springer International Publishing, 2015.
R. Koenker, V. Chernozhukov, X. He, and L. Peng, Eds., Handbook of Quantile Regression. Chapman and Hall/CRC, 2017.
T. Emmanuel, T. Maupong, D. Mpoeleng, T. Semong, B. Mphago, and O. Tabona, “A survey on missing data in machine learning,” J. Big Data, vol. 8, no. 1, p. 140, Oct. 2021, doi: 10.1186/s40537-021-00516-9.
D. Bertsimas, C. Pawlowski, and Y. Zhuo, “From predictive methods to missing data imputation: An optimization approach,” J. Mach. Learn. Res., vol. 18, pp. 1–39, 2018.
H. Liu, Feature Engineering for Machine Learning and Data Analytics. 2018.
V. Hodge and J. Austin, “A Survey of Outlier Detection Methodologies,” Artif. Intell. Rev., vol. 22, no. 2, pp. 85–126, Oct. 2004, doi: 10.1023/B:AIRE.0000045502.10941.a9.
T. Hastie, R. Tibshirani, and J. H. Friedman, The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer, 2001.
L. Breiman, “Random Forests,” Mach. Learn., vol. 45, no. 1, pp. 5–32, Oct. 2001, doi: 10.1023/A:1010933404324.
J. H. Friedman, “Greedy function approximation: A gradient boosting machine.,” Ann. Stat., vol. 29, no. 5, Oct. 2001, doi: 10.1214/aos/1013203451.
S. Shafazand, “Sleep in Women: Gender Differences in Health and Disease,” in Principles of Gender-Specific Medicine, Elsevier, 2010, pp. 244–251.
M. Hirshkowitz et al., “National Sleep Foundation’s sleep time duration recommendations: methodology and results summary,” Sleep Heal., vol. 1, no. 1, pp. 40–43, Mar. 2015, doi: 10.1016/j.sleh.2014.12.010.
H. G. Lund, B. D. Reider, A. B. Whiting, and J. R. Prichard, “Sleep Patterns and Predictors of Disturbed Sleep in a Large Population of College Students,” J. Adolesc. Heal., vol. 46, no. 2, pp. 124–132, Feb. 2010, doi: 10.1016/j.jadohealth.2009.06.016.
D. Kalmbach et al., “Hyperarousal and sleep reactivity in insomnia: current insights,” Nat. Sci. Sleep, vol. Volume 10, pp. 193–201, Jul. 2018, doi: 10.2147/NSS.S138823.
E. Christodoulou, J. Ma, G. S. Collins, E. W. Steyerberg, J. Y. Verbakel, and B. Van Calster, “A systematic review shows no performance benefit of machine learning over logistic regression for clinical prediction models,” J. Clin. Epidemiol., vol. 110, pp. 12–22, Jun. 2019, doi: 10.1016/j.jclinepi.2019.02.004
Downloads
Submitted
Accepted
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Jurnal Nasional dan Sistem Informasi

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Hak cipta untuk artikel ini ditransfer ke Jurnal Nasional Teknologi dan Sistem Informasi (TEKNOSI) jika dan ketika artikel diterima untuk publikasi. Yang bertanda tangan di bawah ini dengan ini mentransfer setiap dan semua hak di dalam dan ke kertas termasuk tanpa batasan semua hak cipta untuk TEKNOSI. Yang bertanda tangan di bawah ini dengan ini menyatakan dan menjamin bahwa makalah tersebut asli dan bahwa ia adalah pembuat makalah, kecuali untuk bahan yang secara jelas diidentifikasi sebagai sumber aslinya, dengan pemberitahuan izin dari pemilik hak cipta jika diperlukan. Yang bertanda tangan di bawah ini menyatakan bahwa ia memiliki kekuatan dan wewenang untuk membuat dan melaksanakan penugasan ini.
Kami menyatakan bahwa:
- Makalah ini belum diterbitkan dalam bentuk yang sama di tempat lain.
- Makalah ini tidak akan dikirimkan di tempat lain untuk publikasi sebelum penerimaan/penolakan oleh Jurnal ini
- Izin hak cipta diperoleh untuk materi yang diterbitkan di tempat lain dan yang memerlukan izin ini untuk reproduksi.
Selanjutnya, Saya/kami dengan ini mentransfer hak publikasi yang tidak terbatas dari makalah yang disebutkan di atas secara keseluruhan kepada TEKNOSI. Transfer hak cipta mencakup hak untuk mereproduksi dan mendistribusikan artikel, termasuk cetak ulang, terjemahan, reproduksi foto, mikroform, bentuk elektronik (offline, online) atau reproduksi lain yang serupa.
Penulis yang sesuai menandatangani dan menerima tanggung jawab untuk merilis materi ini atas nama setiap dan semua penulis bersama. Perjanjian ini harus ditandatangani oleh setidaknya salah satu penulis yang telah memperoleh persetujuan dari rekan penulis jika berlaku. Setelah pengajuan perjanjian ini ditandatangani oleh penulis yang sesuai, perubahan kepengarangan atau dalam urutan penulis yang tercantum tidak akan diterima.
Hak / Syarat dan Ketentuan yang dipertahankan :
- Penulis memiliki semua hak kepemilikan dalam setiap proses, prosedur, atau artikel manufaktur yang dijelaskan dalam Karya ini.
- Penulis dapat mereproduksi atau mengotorisasi orang lain untuk mereproduksi karya ini atau karya turunannya untuk penggunaan pribadi penulis atau untuk penggunaan perusahaan, dengan ketentuan bahwa sumber dan menyatakan hak cipta dimiliki TEKNOSI, salinan tidak digunakan dengan cara apa pun yang menyiratkan pengesahan TEKNOSI atas suatu produk atau layanan dari pihak mana pun, dan salinannya sendiri tidak ditawarkan untuk dijual.
- Meskipun penulis diizinkan untuk menggunakan kembali semua atau sebagian dari karya ini dalam karya lain, ini tidak termasuk mengabulkan permintaan pihak ketiga untuk mencetak ulang, menerbitkan ulang, atau jenis penggunaan ulang lainnya.













