The Ensemble Model

Four powerful algorithms working together

Random Forest

Creates multiple decision trees and combines their predictions for robust results.

Tree-based

XGBoost

Gradient boosting algorithm that sequentially improves predictions.

Boosting

Gradient Boosting

Builds models iteratively, each correcting errors from the previous.

Boosting

Logistic Regression

Statistical model providing probability estimates with interpretability.

Linear
Your Data
RF XGB GB LR
Soft Voting
Final Prediction

The VotingClassifier combines predictions from all four models using soft voting, averaging probability estimates to produce a more accurate and stable final prediction.

Model Performance

Evaluation metrics from our test dataset (12,500+ samples)

73.15%

Accuracy

Overall prediction accuracy

75.29%

Precision

True positive accuracy

70.32%

Recall

True positive detection rate

72.72%

F1 Score

Balance of precision & recall

Model Diagnostics

Detailed performance visualizations

Top 10 Risk Factors

Features ranked by importance in prediction

Confusion Matrix

Prediction vs Actual outcomes

Pred: Low Risk Pred: High Risk
Actual: Low 4684 True Negative 1472 False Positive
Actual: High 1893 False Negative 4484 True Positive

ROC Curve

Receiver Operating Characteristic - Model Discrimination

Confidence Distribution

Prediction probability spread

Class Distribution

Test dataset balance

Model Performance Radar

Key metrics comparison

Data

The foundation of our model

70,000 Patient Records
12 Features Analyzed
80/20 Train/Test Split

Dataset Source

Cardiovascular Disease Dataset from Kaggle, containing patient examination data from medical records.

View on Kaggle

Explainable AI with SHAP

Understanding why the model makes specific predictions

What is SHAP?

SHAP (SHapley Additive exPlanations) is a game-theoretic approach to explain machine learning predictions. It calculates the contribution of each feature to the final prediction.

Shows which factors increase or decrease risk
Provides individual explanations for each prediction
Mathematically consistent and fair attribution

Example: Feature Contributions

High Blood Pressure
↑ Risk
Regular Exercise
↓ Risk
Elevated Cholesterol
↑ Risk

Cardiovascular Health 101

Understanding the factors that affect your heart

Blood Pressure

High blood pressure (hypertension) makes your heart work harder and damages artery walls over time.

Normal: <120/80 Elevated: 120-129/80 High: ≥130/80

Cholesterol

High cholesterol leads to plaque buildup in arteries, restricting blood flow and increasing heart attack risk.

LDL ("bad") cholesterol should be below 100 mg/dL for optimal heart health.

BMI & Weight

Excess weight increases strain on your heart and is linked to higher blood pressure and cholesterol.

Normal: 18.5-24.9 Overweight: 25-29.9 Obese: ≥30

Smoking

Smoking damages blood vessels, reduces oxygen in blood, and significantly increases cardiovascular disease risk.

Within 1 year of quitting, your heart disease risk drops to half that of a smoker.

Physical Activity

Regular exercise strengthens the heart, improves circulation, and helps maintain healthy weight and blood pressure.

150 minutes/week of moderate activity can reduce heart disease risk by up to 30%.

Blood Glucose

High blood sugar damages blood vessels and nerves that control the heart, increasing cardiovascular risk.

Normal: <100 mg/dL Pre-diabetic: 100-125 Diabetic: ≥126

Ready to Check Your Heart Health?

Get your personalized risk assessment in under 2 minutes

Start Assessment