Diabetes Risk
Prediction with ML
The dataset came from the CDC BRFSS 2015 survey — a nationally representative telephone survey on health behaviours and conditions. The version used was already pre-balanced to a 50/50 diabetes/non-diabetes split, removing the need for SMOTE or class weighting.
Most of the 22 columns are binary or ordinal categorical variables (e.g. HighBP, HighChol). Preprocessing involved checking for nulls (none found), applying min-max normalization across all numerical columns, and confirming no duplicate rows. Work was split into two tracks: Track A kept all 18 meaningful features for initial LR and RF experiments, while Track B aggressively pruned to 9 to reduce noise for eventual neural network training.
Before building any models I ran a full EDA pass to understand distributions, class separation, and inter-feature correlations. The BMI boxplot immediately showed diabetic respondents had a noticeably higher median BMI (~31) compared to non-diabetic (~27), with wider spread — making it the clearest single visual separator in the dataset.
The BMI histogram confirmed the distribution is right-skewed (mean ≈ 29.9) with the peak around 28–30. The pairplot revealed BMI and Age together provide the cleanest cluster separation. The correlation heatmap (darker = stronger correlation) showed GenHlth had the second-highest correlation with diabetes at 0.41, much stronger than most other binary indicators.
After training Random Forest on the 18-feature Track A dataset, I extracted permutation importances and compared them against Logistic Regression L2 coefficients. Both ranked BMI at the top by a wide margin — RF importance 0.170 vs. next-highest Age at 0.127. The LR coefficient for BMI was 6.25, compared to GenHlth at 2.35 and HighBP at 1.88.
This cross-validated ranking directly informed Track B’s feature selection: the 9 kept features were chosen by combining the top RF importances with clinical reasoning (e.g. HighChol and CholCheck are closely linked to BMI-driven metabolic risk).
I ran five progressive experiments on Track A, varying regularization type, interaction terms, and Optuna hyperparameter tuning. Test 0 used a plain baseline. Tests 1–3 introduced L1/L2 regularization and manually engineered interaction terms (BMI × Age, BMI × HighBP, Age × GenHlth). Test 4 added ElasticNet. Each was evaluated on the same 80/20 train-test split for both LR and RF.
Test 2 (L2 + interaction terms) was best for both models: LR 75.10%, RF 75.06%. Across all configs the two models stayed within 1.6 percentage points, suggesting the dataset ceiling is around 75% for linear approaches without deeper engineering.
Track A used a standard 80/20 train-test split across all five experiments. For Track B, I switched to a 60/20/20 split to create a dedicated validation set — necessary for tuning a neural network without contaminating the held-out test set. The balanced dataset meant no stratified split was required.
At the end of the program, our team presented the full project to a panel of AWS employees and Delta Institute mentors. We walked through the end-to-end pipeline — from data sourcing and EDA through feature selection, model iterations, and final results. The audience included working data scientists and cloud engineers who asked detailed questions about our methodology.
Key feedback received from the panel: