Inspiration

Sleep disorders affect millions worldwide, often going undetected until serious health issues arise. I wanted to create a tool that could predict sleep disorders early using simple health and lifestyle information, helping people take proactive steps to improve their sleep and overall well-being.

What it does

The Sleep Disorder Prediction App allows users to input health and lifestyle data such as age, sleep duration, stress level, heart rate, daily steps, gender, BMI, occupation, and blood pressure. It then predicts whether a user may have a sleep disorder and provides a confidence score, helping users understand their risk level quickly.

How we built it

  • Data preparation: Take dataset from kaggle, Cleaned the dataset, created a binary target (0 = No Disorder, 1 = Sleep Disorder), split blood pressure into systolic and diastolic, and separated numeric and categorical features.
  • Modeling: Trained a baseline Logistic Regression model, then improved performance using SMOTE for imbalanced classes and XGBoost for more complex patterns.
  • Evaluation: Used accuracy, precision, recall, F1-score, confusion matrix, and ROC AUC to measure performance.
  • Deployment: Developed an interactive web app using Gradio, allowing real-time predictions with example inputs.

Challenges we ran into

-Imbalanced dataset: Most participants had no sleep disorder, requiring oversampling via SMOTE.

  • Feature preprocessing: Combining numeric and categorical data correctly in a pipeline was tricky.
  • Deployment reliability: Ensuring the app handled all input types and provided consistent predictions, showed error multiple times due to tricky data handling but later was successful to deploy it.

Accomplishments that we're proud of

-Achieved 96% accuracy and 0.959 ROC AUC with the final model.

  • Built a fully interactive web app that users can test easily.
  • Addressed this problem, Create a solution worked on it in very short period of time and made a successful working app that is ready for innovation.

What we learned

-End-to-end machine learning workflow: from data cleaning and preprocessing to model evaluation and deployment.

  • Handling imbalanced datasets and combining numeric/categorical preprocessing pipelines.
  • Building a user-friendly interface for real-world applications. -Self believe and ability to solve problem -Art of trusting yourself and your abilities -To know making mistakes or errors is not a part of failure it is a sign of success.

What's next for Sleep Disorder Prediction

  • Integrate more health features for better predictions.
  • Add personalized tips and recommendations for improving sleep.
  • Expand deployment to mobile or cloud platforms for wider accessibility. -Add more features to it -Raise awareness on importance of sleep

Built With

Share this project:

Updates