Nature and Science of Sleep (Jun 2025)
Construction and Validation of a Machine Learning-Based Risk Prediction Model for Sleep Quality in Patients with OSA
Abstract
Yangyang Tong,1 Kuo Wen,2 Enguang Li,3 Fangzhu Ai,4 Ping Tang,5 Hongjuan Wen,3 Botang Guo5 1Department of Pulmonary Oncology, Affiliated Hospital of Changchun University of Traditional Chinese Medicine, Changchun, Jilin, 130117, People’s Republic of China; 2College of Traditional Chinese Medicine, Changchun University of Traditional Chinese Medicine, Changchun, Jilin, 130117, People’s Republic of China; 3College of Health Management, Changchun University of Traditional Chinese Medicine, Changchun, Jilin, 130117, People’s Republic of China; 4School of Nursing, Jinzhou Medical University, Jinzhou, Liaoning Province, 121000, People’s Republic of China; 5Department of General Practice, the Affiliated Luohu Hospital of Shenzhen University Medical School, Shenzhen, 518001, People’s Republic of ChinaCorrespondence: Botang Guo, Department of General Practice, The Affiliated Luohu Hospital of Shenzhen University Medical School, Shenzhen, 518001, People’s Republic of China, Email [email protected] Hongjuan Wen, College of Health Management, Changchun University of Traditional Chinese Medicine, Changchun, Jilin, 130117, People’s Republic of China, Email [email protected]: The aim of this study was to establish a risk prediction model for sleep quality in patients with obstructive sleep apnea (OSA) based on machine learning algorithms with optimal predictive performance.Methods: A total of 400 OSA patients were included in this study. A LightGBM model was constructed and compared with other machine learning models, in terms of performance metrics such as the area under the receiver operating characteristic curve (AUC), calibration curves, and decision curve analysis (DCA). The SHapley Additive exPlanation (SHAP) analysis was used to interpret the model and identify key predictors of sleep quality.Results: The LightGBM model demonstrated the best predictive performance, with an AUC of 0.910 in the validation set, outperforming support vector machine and random forest. SHAP analysis identified six key predictors of sleep quality: depressive symptoms, OSA duration, oxygen desaturation index (ODI), anxiety symptoms, exercise frequency, and coffee consumption. The model’s calibration curve indicated a high degree of agreement between predicted and observed outcomes, and DCA confirmed its clinical utility.Conclusion: The LightGBM model is the best choice for predicting sleep quality in patients with OSA. Depressive symptoms and ODI were the most influential factors negatively associated with sleep quality. This study not only deepens understanding of the factors affecting sleep quality in OSA patients, but also provides a powerful predictive tool for clinical doctors. Future research can explore the potential of incorporating these predictive factors into comprehensive treatment strategies to improve patient prognosis and overall quality of life.Keywords: machine learning, risk prediction, sleep quality, OSA, SHAP