Life Expectancy ML Capstone
End-to-End Regression, Classification & Explainable Predictions
Built an end-to-end machine learning workflow on WHO life-expectancy data covering EDA, regression, classification, ensemble tuning, model persistence, and structured LLM-powered explanations.
System Architecture
Academic end-to-end ML workflow documented in the life-expectancy capstone.
WHO life-expectancy records
2,938 country-year records enter a documented exploratory and modeling workflow.
Task-aware preprocessing
Cleaning, encoding, scaling, feature selection, and splits are applied for regression and classification.
Model baselines
Multiple algorithms establish comparable baselines before more expensive tuning.
Cross-validated ensembles
Grid search and cross-validation select stronger models while preserving evaluation discipline.
Saved model + explanation
Persisted artifacts support repeatable inference and structured LLM-assisted explanations.
0.9923 test ROC-AUC with 0.9898 cross-validation ROC-AUC.
Project Overview
This capstone uses 2,938 country-year records from the WHO Life Expectancy dataset to study demographic, healthcare, economic, and social indicators associated with life expectancy.
The workflow progresses from data cleaning and exploratory analysis to regression and classification baselines, ensemble models, five-fold cross-validation, GridSearchCV tuning, and serialization of the best reusable pipeline.
The final stage adds a guarded LLM explanation layer around model predictions, including structured JSON validation, PII protections, and a deterministic mock fallback for reproducible execution without API credits.
The tuned Random Forest pipeline achieved a mean cross-validated AUC of approximately 0.9898 and a test-set AUC of approximately 0.9923 on the project dataset.
Problem
Life expectancy is influenced by interacting health, demographic, and socioeconomic variables, requiring a reproducible workflow that can compare models and explain predictions responsibly.
Solution
Created a four-part ML capstone spanning preprocessing, statistical exploration, regression and classification, ensemble tuning, saved model artifacts, and structured natural-language prediction explanations.