Skip to content
tejaswirajgitPublic

About

Cardiovascular disease risk predictor: Gradient Boosting on 70k patient records (~73% accuracy), deployed as a live Streamlit app.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

❤️ Cardiovascular Disease Risk Predictor

Python Streamlit scikit-learn Live Demo

A production-ready machine learning web application for cardiovascular disease risk prediction, built with Streamlit and powered by a GradientBoostingClassifier trained on 70,000 patient records from the Kaggle Cardiovascular Disease dataset. The model uses 12 clinically relevant and lifestyle-linked features, including age, BMI, blood pressure, cholesterol, glucose, smoking, alcohol consumption, and physical activity, and achieves approximately 73% accuracy in binary risk classification.

Live Demo

Try the deployed app here:

Features

  • Real-time BMI calculation from height and weight inputs
  • Risk probability gauge/progress indicator for predicted cardiovascular risk
  • Blood pressure category display (Normal, Elevated, High)
  • BMI category display (Underweight, Normal, Overweight, Obese)
  • 12-feature patient input form aligned with model training schema

Dataset

This project uses the Kaggle Cardiovascular Disease Dataset (Sulianova).

Feature Schema

Feature Description
age Age in days (converted to years during preprocessing)
gender Biological sex encoded as categorical value
height Height in centimeters
weight Weight in kilograms
ap_hi Systolic blood pressure
ap_lo Diastolic blood pressure
cholesterol Cholesterol category
gluc Glucose category
smoke Smoking status
alco Alcohol consumption status
active Physical activity status
cardio Target label (0: low risk, 1: cardiovascular disease risk)

ML Pipeline

The model development workflow follows this sequence:

  1. Data cleaning (including outlier removal)
  2. Feature engineering (BMI creation and age conversion from days to years)
  3. Standardization using StandardScaler
  4. Dimensionality reduction using LinearDiscriminantAnalysis (LDA)
  5. Classification using GradientBoostingClassifier

How to Run Locally

git clone https://github.com/tejaswirajgit/cardio
cd cardio
pip install -r requirements.txt
python train_save_model.py
streamlit run app.py

Research Reference

This project is aligned with the research work:

Cardiovascular Disease Prediction and Prevention: Exploring Novel Techniques and Applications Using Machine Learning
12th International Conference, 2023
By Tejaswi Raj

Author

Tejaswi Raj
ML Research Engineer
Chandigarh University | DRDO | IIT Mandi
GitHub: https://github.com/tejaswirajgit

About

Cardiovascular disease risk predictor: Gradient Boosting on 70k patient records (~73% accuracy), deployed as a live Streamlit app.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages