Back to projects
Machine LearningLogistic RegressionXGBoost2026

10-Year Coronary Heart Disease Risk PredictionFramingham Heart Study · Predictive Modeling

Predicted 10-year CHD risk on the Framingham teaching dataset with KNN imputation, SMOTE balancing, clinical interaction features, and a seven-model bake-off including ensembles.

Role

Data Analyst

Category

Predictive Analytics

Year

2026

Deliverables

Preprocessing pipeline, model comparison, risk stratification report

10-Year Coronary Heart Disease Risk Prediction

0.696

Best AUC-ROC (Logistic Regression)

0.669

Soft-voting ensemble AUC

15%

Positive CHD rate (imbalanced)

7

Models compared

The problem

Can demographic, behavioral, and clinical features from the Framingham Heart Study Teaching Dataset meaningfully stratify 10-year coronary heart disease (CHD) risk beyond a trivial baseline? The target (TenYearCHD) is imbalanced at ~15% positive cases, so accuracy alone is a misleading metric.

Pipeline

  • KNN imputation (k=5) for missing values without distorting distributions
  • Standard scaling for comparable feature magnitudes
  • SMOTE to balance the training set to 50/50 (null error rate baseline = 50%)
  • Clinical interaction features (e.g., age×sysBP, age×diaBP) to capture compound risk

EDA highlighted age, systolic blood pressure, hypertension, and diabetes as strong individual predictors. Several binary features (BPMeds, prevalentStroke, diabetes) are extremely rare, limiting their standalone signal.

Model bake-off

Seven models were evaluated with AUC-ROC as the primary metric:

  • Logistic Regression — 0.6959 (preferred)
  • Soft-voting ensemble (LR + KNN + SVM + Decision Tree) — 0.6692
  • Random Forest — 0.6553 (best among tree/neural models)
  • XGBoost and Multilayer Perceptron — lower AUC than Random Forest

Key finding

The soft-voting ensemble beat XGBoost, Random Forest, and MLP — but still lost to Logistic Regression. When one base learner is substantially stronger, averaging in weaker models dilutes the discriminative signal.

Results & interpretation

  • All primary models beat the 50% null baseline on the imbalanced test set
  • Logistic Regression is the recommended deployment model for CHD risk stratification
  • Random Forest remains the strongest tree-based option when interpretability via feature importances is required
  • Interaction features ranked among the most important predictors across models

Limitations

Framingham is predominantly White, middle-aged adults in one geography — limiting generalizability. Even after SMOTE on training data, minority-class recall on the original-imbalance test set remains a practical challenge. Future work should include calibration (Platt / isotonic), SHAP explanations, and external validation on cohorts such as NHANES.


Interested in similar work? Get in touch.

Ready to connect?

Interested in similar work?

Actively seeking full-time data analyst roles. Based in Jersey City, NJ, with New York City and the surrounding area as my first choice, and willing to relocate anywhere in the U.S. or abroad for the right opportunity.

Get in touch →