Phase 06 · Predictive Modeling

🤖

Machine Learning

I trained and compared 3 scikit-learn models for two prediction tasks: a regression model predicting state cancer incidence rates, and a binary classifier identifying high-risk states. All models use 13 environmental and lifestyle features from the Gold master risk profile.

2Models Built
R²=0.81Regression Score
AUC=1.0Classifier Score
13Features Used
Bronze Silver Gold Analytics Machine Learning

What the ML Phase Does

The ML phase builds predictive models on top of the Gold master risk profile — going beyond correlation to quantify feature importance and test whether cancer outcomes are statistically distinguishable from environmental and lifestyle data alone. I use scikit-learn (not Spark MLlib, which is restricted in Databricks Free Edition serverless) running on the driver node — appropriate for this 51-state dataset.

I compare three model types for each task: a linear baseline (Ridge Regression / Logistic Regression), a Random Forest, and a Gradient Boosting model. The Random Forest feature importance provides the most analytically meaningful output — it captures non-linear effects and interaction terms that Pearson correlation misses entirely. PM2.5 days, for example, shows r=0.199 in correlation but 0.28 importance in Random Forest — the strongest single predictor for cancer incidence.

Results are interpreted with appropriate caution: models are trained and evaluated on the same 51 states (no held-out test set), so metrics reflect fit quality rather than true generalization. The practical value is in feature importance rankings and confirming that high-incidence states are statistically distinguishable from low-incidence states using publicly available data.

ML Notebooks