Project Insights

A deep dive into the data, algorithms, and performance metrics behind CardioPredict.

The Methodology

A systematic approach to data cleaning, feature engineering, and model selection.

01

Data Cleaning

Removing physiological outliers (e.g., blood pressure readings > 250 or < 40) to ensure the model learns from clinically plausible data patterns.

02

Feature Scaling

Applying StandardScaler to normalize metrics across different units (Age in days, BP in mmHg), preventing high-magnitude features from biasing the results.

03

Model Optimization

Optimizing Gradient Boosting parameters with early stopping and regularization to prevent overfitting while maximizing predictive accuracy.

💾The Dataset

We utilized the widely respected Cardiovascular Disease Dataset from Kaggle. It contains over 70,000 patient records with 11 distinct features, providing a robust foundation for training machine learning models.

70,000+
Anonymized Clinical Records

Target Variable

Objective: Predict presence of heart disease (Binary Classification).0 = No Disease, 1 = Disease present.

  • Demographics: Age, Gender, Height, Weight.
  • Exam Results: Blood Pressure (Systolic & Diastolic), Cholesterol, Glucose.
  • Lifestyles: Smoking, Alcohol, Physical Activity.

XGBoost Classifier

We utilized XGBoost (Extreme Gradient Boosting), a state-of-the-art machine learning algorithm known for its high performance and scalability. It builds an ensemble of decision trees to capture complex non-linear relationships in the data.

n_estimators=300

Model Performance

Accuracy73.9%
Precision76.0%
Recall70.0%
F1 Score73.0%

Confusion Matrix

Predicted
5,432True Negative
1,556False Positive
2,103False Negative
4,909True Positive

ROC Curve Analysis

ROC Curve showing model performance

The Receiver Operating Characteristic (ROC) curve illustrates the diagnostic ability of our XGBoost classifier. An Area Under the Curve (AUC) of ~0.80 indicates good discriminative power between patients with and without cardiovascular disease.

Clinical Disclaimer

This tool is designed for educational and informational purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment.

"While our model achieves high diagnostic accuracy, always consult a certified healthcare provider regarding any cardiovascular concerns or symptoms."

Not a Medical DeviceAI Prediction ModelData Driven Insights