Evaluation of Machine Learning Models in Predicting Sleep Quality Based on Diet and Physical Activity

Authors

  • amril mutoi Siregar Institut Teknologi Sains Bandung
  • Gunawan Witjaksono Informatika, Fakutas Digital Desain dan Bisnis, Institut Teknologi Sains Bandung
  • Angga Jovansyah Informatika, Fakutas Digital Desain dan Bisnis, Institut Teknologi Sains Bandung

DOI:

https://doi.org/10.25077/TEKNOSI.v12i2.2026.213-221

Keywords:

Sleep Quality Logistic Regression Gradient Boosting Permutation Feature Importance Diet

Abstract

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 sizes

References

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

Submitted

2026-05-04

Accepted

2026-08-13

Published

2026-08-23

How to Cite

[1]
amril mutoi Siregar, G. Witjaksono, and A. Jovansyah, “Evaluation of Machine Learning Models in Predicting Sleep Quality Based on Diet and Physical Activity”, TEKNOSI, vol. 12, no. 2, pp. 213–221, Aug. 2026.

Similar Articles

1 2 3 4 > >> 

You may also start an advanced similarity search for this article.