ABSTRACT
Sleep disorders, including insomnia and obstructive sleep apnea, affect millions of individuals worldwide but are frequently undetected due to the high cost, limited availability, and complexity of conventional diagnostic tools such as polysomnography. This study presents an interpretable machine learning framework for multi-class sleep disorder classification that utilizes routine clinical and lifestyle data, offering an accessible, data-driven approach to screening. The dataset was preprocessed and balanced using SMOTE-ENN, and three ensemble models, Random Forest, XGBoost, and LightGBM, were systematically trained and optimized. Among these, LightGBM demonstrated superior performance, achieving a test accuracy, precision, and recall of 0.9835 above with a minimal train–test accuracy gap of 0.0105, indicating strong generalization and limited overfitting. Feature importance analysis identified systolic blood pressure and BMI category as the most influential predictors, consistent with established clinical knowledge. To enable practical application, the optimized model was deployed through a lightweight Flask-based web application, providing real-time, point-of-care predictions without requiring specialized equipment. The findings demonstrate that well-tuned tree-based ensemble models can deliver accurate, interpretable, and clinically actionable tools for the early detection of sleep disorders, supporting timely intervention and expanding access to sleep health management across diverse healthcare settings.
Competing Interest Statement
The authors have declared no competing interest.
Funding Statement
This study did not receive any funding
Author Declarations
I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.
Yes
I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.
Yes
I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).
Yes
I have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.
Yes
Data Availability
full available





