Sleep is essential for human health, greatly influencing mental performance, emotional stability, and general well-being. Lack of sleep, which pertains to inadequate rest, is often linked to heightened stress levels. Nevertheless, the connection between stress and different influencing elements is intricate, complicating efforts to evaluate and forecast accurately.
This study examines the use of machine learning techniques to predict stress levels using sleep-related and behavioral variables. The dataset includes 60 participants and 14 variables such as sleep duration, sleep quality, cognitive performance, emotional regulation, and lifestyle factors. To tackle the issue of a restricted dataset, methods for creating synthetic data were employed to increase the sample size while maintaining statistical correlations.
Four machine learning models—Linear Regression, Random Forest, Gradient Boosting, and Extreme Gradient Boosting (XGBoost)—were applied and tested using multiple performance metrics. The results show that although synthetic data improves model training, predicting stress using only sleep-related variables is still limited. Among the models, XGBoost performed relatively better but still showed modest predictive capability. The study shows the need for adding additional physiological and environmental factors for more better stress prediction.
Introduction
This study investigates the relationship between sleep patterns and stress levels using machine learning techniques, aiming to predict stress based on behavioral and sleep-related data without relying on physiological sensors.
Sleep is essential for physical and mental health, but modern lifestyles—such as workload pressure, screen exposure, and irregular routines—often lead to poor sleep quality and increased stress. Since stress is influenced by multiple psychological, physiological, and environmental factors, traditional self-reported methods are often unreliable. To address this, the study uses machine learning models to identify patterns in data and predict stress levels.
The dataset includes 60 participants and 14 variables, such as sleep duration, sleep quality, reaction time, memory performance, emotional regulation, caffeine intake, physical activity, BMI, and stress level (target variable). Because the dataset is small, synthetic data generation techniques (normal distribution sampling and multivariate sampling) were used to expand it while preserving statistical relationships.
Several machine learning models were applied, including Linear Regression, Random Forest, Gradient Boosting, and XGBoost, and their performance was evaluated using metrics like R², RMSE, MAE, and explained variance.
The results show that XGBoost performed best, followed by other ensemble methods, while Linear Regression performed poorly, indicating that the relationship between sleep and stress is non-linear. However, overall prediction accuracy remained limited, suggesting that sleep-related factors alone are not sufficient to accurately predict stress levels.
Feature analysis revealed that short sleep duration and poor sleep quality are associated with higher stress, while better emotional regulation is linked to lower stress. Despite these relationships, the models struggled to accurately predict extreme stress values and tended to produce average-level predictions.
Conclusion
This study explored the use of machine literacy models to prognosticate stress situations grounded on sleep- related and behavioral data. While some connections were linked, the models showed limited prophetic delicacy.
Among the models tested, XGBoost performed stylish, but the results indicate that fresh data sources are necessary for meaningful stress vaticination.
References
[1] M. A. Grandner, “Sleep, Health, and Society,” Sleep Medicine Clinics, vol. 12, no. 1, pp. 1–22, 2017.
[2] T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016, pp. 785–794.
[3] L. Breiman, “Random Forests,” Machine Learning, vol. 45, no. 1, pp. 5–32, 2001.
[4] J. Friedman, “Greedy Function Approximation: A Gradient Boosting Machine,” Annals of Statistics, vol. 29, no. 5, pp. 1189–1232, 2001.
[5] C. A. Espie, “Insomnia: Conceptual Issues in the Development, Persistence, and Treatment of Sleep Disorder in Adults,” Annual Review of Psychology, vol. 53, pp. 215–243, 2002.
[6] American Psychological Association, “Stress in America Survey,” 2021.
[7] S. Cohen, D. Janicki-Deverts, and G. E. Miller, “Psychological Stress and Disease,” JAMA, vol. 298, no. 14, pp. 1685–1687, 2007.