Inspiration

Heart disease is typically considered to occur among older individuals, but the grim reality is that it can happen at any age, at any moment. We learned this the hard way with the loss of a good friend, a sixteen-year-old boy, to a heart attack. His death came as a surprise, not only because he was so young, but also because heart disease in youth is something that is rarely discussed.

This loss inspired us. What if we were able to build a machine learning model that helps in the early detection of heart disease risk, before it is too late? What if we could prevent another family from going through this kind of loss?

What it does

Our model is designed to predict an individual’s risk of heart disease by analyzing key health metrics, including:

  • Blood pressure
  • Cholesterol levels
  • Heart rate
  • Glucose levels
  • Age, BMI, and lifestyle factors

Using real-world medical datasets, the model identifies patterns and correlations between these variables and the presence of cardiovascular disease. Unlike traditional risk calculators, our model learns from data, improving its accuracy over time.

But making predictions alone isn’t enough. Medicine needs explainability—patients and doctors must understand why a person is at risk. That’s why we use SHAP values (Shapley Additive Explanations) to break down each prediction, showing which factors contributed most to the final risk score.

How we built it

Before training our models, we went through an extensive data preprocessing pipeline:

  1. Cleaning & Standardization – Handling missing values, encoding categorical data, and scaling numerical features.
  2. Exploratory Data Analysis (EDA) – Identifying trends, distributions, and correlations between risk factors.
  3. Model Selection & Training – We experimented with multiple algorithms: -Logistic Regression -Decision Trees -Random Forests -Support Vector Machines (SVMs) -K-Nearest Neighbors (KNN)
  4. Performance Evaluation – We measured accuracy using precision, recall, F1-score, and ROC curves.
  5. Hyperparameter Tuning – Fine-tuning model parameters to optimize performance.
  6. SHAP Analysis – Ensuring interpretability by visualizing individual predictions and understanding the impact of each health metric. ## Challenges we ran into
  7. Data Imbalance: Cardiovascular disease cases were less frequent in our dataset, which required oversampling techniques to prevent bias.
  8. Accuracy vs. Interpretability: Complex models like Random Forests performed well but lacked transparency, leading us to incorporate SHAP values for explainability.
  9. Real-World Applicability: Ensuring our predictions were not just statistically accurate but also clinically meaningful. ## Accomplishments that we're proud of
  10. Developing a highly accurate, interpretable machine learning model for heart disease prediction.
  11. Successfully integrating SHAP values to improve AI transparency in medicine.
  12. Creating a project that could have real-world impact, potentially saving lives. ## What we learned
  13. The importance of explainability in AI, especially in healthcare.
  14. How to balance performance and interpretability in machine learning models.
  15. The devastating reality of heart disease in young people and the need for better early detection tools. ## What's next for AI-Driven Cardiovascular Risk Prediction
  16. Expand the dataset to include more diverse patient populations.
  17. Integrate with wearable devices for real-time risk monitoring.
  18. Develop a user-friendly app so individuals can check their heart disease risk instantly.
  19. Collaborate with medical professionals to validate and improve the model’s accuracy in clinical settings.

Built With

Share this project:

Updates