Inspiration
As college students, we sometimes neglect to think about how the decisions we make today will affect our health 50 years down the line. Chronic diseases like heart disease, diabetes, and lung conditions impact millions of people ever year, yet most only address their health after these symptoms appear. We built DigitalTwin around a new approach to healthcare focused on preventing diseases before they even occur.
What it does
DigitalTwin creates a simulation of your future self based on current habits. Users input biometric data or sync wearable devices, and our machine learning model predicts your biological age and flags future health risks. Interactive sliders let users see how different changes (sleep, diet, exercise) affect their biological age trajectory at every stage of life.
How we built it
- Frontend: Built using React, designed for speed and responsiveness. We focused on creating a clean, minimal UI that allows users to easily input health data or connect wearable devices. The interface includes interactive sliders for lifestyle factors (e.g., exercise, sleep, smoking) and renders real-time updates from the model using React state management and asynchronous API calls.
- Backend: Developed in Python using Flask, the backend manages API endpoints for user inputs, processes incoming health data, and runs real-time model inference. We built modular Flask routes for easy expansion (e.g., future integration with OAuth or external APIs like Fitbit).
- ML Model: We trained an XGBoost regressor on a cleaned subset of the CDC’s NHANES dataset, which includes biometric and lifestyle data from thousands of individuals. Target prediction was chronological age, which we then compared against user inputs to estimate biological age. Categorical features like smoking status were one-hot encoded, while numerical features like sleep and BMI were normalized for model stability.
- Feature Pipeline: Constructed using pandas for data handling and scikit-learn for preprocessing. We implemented a full ML pipeline that supports future retraining and deployment. Our model was optimized using Root Mean Squared Error (RMSE) and we extracted feature importances to generate personalized health recommendations based on each user’s most influential variables.
Challenges we ran into
The largest constraint we faced was data availability. The CDC's NHANES dataset contained many mixed types and missing values, which required significant preprocessing before feeding into the ML model for predictions. We compensated by having the XGBoost regressor account for "Missing" values during the training, but we would need more data to improve the accuracy of our biological age and future health risk predictors.
Accomplishments that we're proud of
For many of us, it was our first hackathon. We were proud of building a fully functioning end-to-end system integrating real health data, machine learning, and an interactive UI. We were able to achieve a strong model performance with clear, interpretable outputs and differentiated ourselves from standard trackers by focusing on prediction, not just monitoring.
What we learned
Data is extremely valuable. DigitalTwin was partly constrained on how much data we had available, so cleaning and processing the CDC data to handle missing features, inconsistent labeling, and numerical vs. categorical features significantly boosted our model's performance. In addition, model interpretability matters in health applications. Users need to understand why a prediction was made. Using feature importance from XGBoost helped us surface meaningful, personalized insights instead of black-box outputs. Finally, user experience is critical in health tech. Our goal was to design an interface that feels intuitive, informative, and not overwhelming.
What's next for DigitalTwin
- API Integration with Apple Health, Fitbit, and Garmin for automatic data input
- Expanded dataset usage for training more accurate models
- Personalized interventions using behavioral science to guide users toward change
Log in or sign up for Devpost to join the conversation.