Abstract
Sleep disorders affect approximately 27% of the global population, significantly impacting quality of life and cardiovascular health. This study evaluates the effectiveness of Logistic Regression and Random Forest algorithms in predicting sleep disorders using lifestyle and physiological data. Utilizing a synthetic dataset of 400 individuals, the research identifies blood pressure and BMI as the most critical predictors. The Random Forest model achieved a superior accuracy of 93%, demonstrating the potential of ensemble learning for personalized sleep health assessment.
Introduction
Evaluating sleep health has historically been generalized, failing to account for the complex interplay of individual habits, body metrics, and occupations. As sleep disorders become increasingly prevalent, there is a significant need for personalized prediction models. This paper investigates machine learning approaches to accurately classify sleep conditions—None, Insomnia, or Sleep Apnea—using multi-dimensional health metrics.
Methodology
The research employs a comparative supervised learning approach, pitting a traditional statistical model against a modern ensemble method.
- Logistic Regression (LR): Used as a baseline for multinomial classification to predict the probability of sleep disorders.
- Random Forest (RF): An ensemble method that utilizes multiple decision trees and "Bagging" (Bootstrap Aggregation) to reduce variance and improve prediction stability.
A key step in the methodology was the preprocessing of the "Blood Pressure" variable, splitting composite strings into distinct systolic and diastolic features. The workflow also included dummy encoding for categorical variables and normalization via a custom scaling process.
Data Description
The study utilizes the Sleep Health and Lifestyle Dataset, a synthetic collection of 400 records. Features include subjective ratings (Quality of Sleep, Stress Level), objective metrics (Age, Sleep Duration, Physical Activity, Blood Pressure, Heart Rate, Daily Steps), and categorical data (Gender, Occupation, BMI Category). The target variable, "Sleep Disorder," is categorized into three classes: None, Insomnia, and Sleep Apnea.
Key Insights and Analysis
The analysis revealed several significant findings regarding the predictors of sleep health:
- The Dominance of Blood Pressure: Blood pressure was identified as the most important feature for prediction, surpassing subjective ratings. This suggests a strong physiological link that machine learning models can exploit more effectively than self-reporting.
- BMI and Obesity Correlation: While individuals with a "Normal" BMI rarely had sleep disorders, 100% of the "Obese" category in this dataset suffered from either sleep apnea or insomnia.
- Gender Disparity: The data showed distinct patterns across genders. Men in the "None" category nearly doubled the number of females, while women showed a higher propensity for certain disorders.
Results
The Random Forest model demonstrated superior performance over the linear baseline:
- Random Forest: Achieved 93% accuracy and 94% precision, with perfect precision (1.00) for the Insomnia class.
- Logistic Regression: Achieved 92% accuracy and 92% precision.
Feature importance was ranked as follows: Blood Pressure (>0.175), BMI Category (~0.175), Occupation (~0.15), Age/Sleep Duration, and Gender (<0.025).
Conclusion
This research highlights the efficacy of ensemble methods like Random Forest in handling complex, non-linear health data. While limited by a small synthetic sample size, the results provide a promising foundation for developing personalized interventions. Future work should focus on validating these models with larger, real-world clinical datasets to improve generalizability and practical application in healthcare.
Summary updated