SleepRiskAI: From Passive Tracking to Predictive Health
1. The Challenge (Problem Identification & Relevance)
The Silent Epidemic of Exhaustion We live in a culture where sleep deprivation is often normalized, yet it remains a primary catalyst for chronic health issues. While the adoption of wearables (Apple Watch, Fitbit) is at an all-time high, these devices suffer from a critical limitation: they are fundamentally reactive.
They act as "rear-view mirrors," telling users how poorly they slept yesterday, but failing to provide clinical predictions about how their current habits will impact their health tomorrow. There is a disconnect between raw data and preventive action. Users have the numbers, but they lack the medical insight to change their trajectory before a disorder develops.
2. The Solution (Impact & Viability)
SleepRiskAI bridges the gap between biometric data and clinical foresight. It is not just a tracker; it is a Predictive Circadian Health Platform.
By leveraging Machine Learning, the system analyzes a patient’s physiological profile (Age, BMI, Blood Pressure) alongside dynamic lifestyle habits (Stress Levels, Physical Activity) to calculate the specific probability of developing sleep disorders.
Key Value Propositions:
Proactive vs. Reactive: We predict risk before it becomes chronic.
The "Lifestyle Lab" (Simulation Engine): Our core differentiator. It allows users to run "what-if" scenarios (e.g., "If I lower my stress levels by 10%, how does my risk score change?"). This turns abstract health data into a tangible, actionable roadmap.
Clinical Bridge: The app generates professional HTML medical reports, facilitating better conversations between patients and doctors.
3. Technical Execution (Innovation & Methods)
Our engineering focus was on transparency and trust. In healthcare, a "black box" algorithm is unacceptable.
Explainable AI (XAI) with SHAP: We implemented SHapley Additive exPlanations (SHAP) to deconstruct the AI's decision-making process. The system doesn't just output a risk score; it visually quantifies the "why."
Example: The user sees that "High Stress" contributed +18% to their risk, while "Physical Activity" reduced it by 5%. This empowers the user to target the root cause.
Architecture & Stack:
Backend: Python serves as the robust core, utilizing scikit-learn for the Random Forest classification models.
Frontend: Built on Streamlit, pushed to its absolute limits with custom CSS injection to create a responsive, app-like experience.
Visualization: Integration of Plotly for interactive radar charts and Matplotlib for decision waterfalls.
4. Design & User Experience (Presentation)
The "Medical Cyberpunk" Aesthetic We deliberately moved away from the sterile, white-and-blue standard of medical apps. We adopted a "Medical Cyberpunk" design system—featuring dark modes, neon cyan accents, and futuristic data visualizations.
Why? To increase user engagement and retention. Health monitoring can be boring; we made it immersive.
Accessibility: Despite the stylized look, high contrast ratios were maintained to ensure readability and accessibility for all users.
5. Challenges & Overcoming Them
Democratizing XAI: The biggest hurdle was translating complex SHAP "log-odds" values into plain English that a layperson could understand. We solved this by creating a custom translation layer that converts mathematical weights into percentage-based "Impact Scores."
Streamlit Customization: Streamlit is designed for rapid prototyping, not complex UIs. We had to reverse-engineer parts of the DOM and inject custom CSS to build features like the "Lifestyle Lab" control panel and the custom progress bars.
Balancing Sensitivity: Tuning the model to detect early signs of risk without causing unnecessary alarm fatigue in healthy users.
6. Roadmap & Scalability (Future Viability)
SleepRiskAI is built to scale. Our roadmap focuses on automation and personalization:
Phase 1: Wearable API Integration (In Progress): Replacing manual data entry with real-time syncing via Apple HealthKit and Google Fit APIs.
Phase 2: "Doctor Sleep" (Generative AI): Integrating an LLM (Large Language Model) agent. This feature will read the XAI data and "speak" to the user, acting as a compassionate sleep coach that provides personalized daily plans based on the user's risk trajectory.
Phase 3: Longitudinal Analysis: Shifting from snapshot predictions to time-series analysis to track health improvements over weeks and months.
Log in or sign up for Devpost to join the conversation.