This project applies machine learning techniques to investigates the relationship between socioeconomic status (income and education) and diabetes prevalence using the Diabetes Health Indicators Dataset from the CDC's Behavioral Risk Factor Surveillance System (BRFSS).
This project was completed as part of a machine learning course at University of Waterloo.
There is a significant negative correlation between socioeconomic status (income and education) and diabetes prevalence. Specifically, individuals in the lowest income bracket are at least twice as likely to have diabetes as those in the highest income bracket.
| Property | Detail |
|---|---|
| Source | Kaggle — Diabetes Health Indicators Dataset |
| Origin | CDC Behavioral Risk Factor Surveillance System (BRFSS) 2015 |
| File used | diabetes_binary_health_indicators_BRFSS2015.csv |
| Rows | 253,680 survey respondents |
| Features | 21 health and demographic variables |
| Target | Diabetes_binary — 0 = No diabetes, 1 = Diabetes / Pre-diabetes |
| Class balance | ~86% No diabetes / ~14% Diabetes (imbalanced) |
- BMI, Age, Sex
- High Blood Pressure, High Cholesterol
- Smoking, Alcohol Consumption, Physical Activity
- Fruits & Vegetable Consumption
- Access to Healthcare, Education, Income Level
- Diabetes rate by income bracket (bar chart)
- Diabetes rate by education level (bar chart)
- Income × Education heatmap showing combined SES effect
- Full feature correlation heatmap
- Feature correlations with target (Income & Education highlighted)
- Computes diabetes prevalence rate per income bracket and calculates the low/high prevalence ratio
- Runs chi-square tests for Income vs Diabetes and Education vs Diabetes
- Computes point-biserial correlations to confirm the direction of the SES relationship
- 80/20 stratified train/test split
StandardScalerapplied for Logistic Regression and SVMclass_weight="balanced"used across all models to handle class imbalance
- Logistic Regression
- Random Forest
- Decision Tree
- SVM
- Confusion matrices, ROC curves, classification reports
- Metrics: ROC-AUC, Accuracy, F1 (macro), Recall for diabetic class
- Logistic Regression: absolute coefficients
- Decision Tree / Random Forest: Gini impurity reduction
- Aggregated normalized importance across all three models
- Income and Education ranked among all 21 features
diabetes-ml-project/
│
├── data/
│ └── diabetes_012_health_indicators_BRFSS2015.csv
├── notebooks/
│ ├── 01_eda.ipynb
│ ├── 02_hypothesis_testing.ipynb
│ └── 03_modeling_1.ipynb
│ └── 04_modeling_2.ipynb
│ └── 05_Evaluation_feature_importance.ipynb
├── .gitignore
└── README.md
| Branch | Purpose |
|---|---|
main |
Stable, reviewed code only |
feature/EDA_analysis |
Exploratory Data Analysis |
feature/hypothesis_test |
Hypothesis_test |
feature/model_training_1 |
Logistic regression, Random forest modeling |
feature/model_training_2 |
Decision Tree & SVM modeling |
feature/evaluation |
Evaluation & Feature Importance |
| Name | Role |
|---|---|
| Taejin Jung | EDA & Visualization |
| Saranya Narayna | Hypothesis testing, & logistic regression, Random forest modeling |
| Chu-Lan Fu | Decision Tree & SVM modeling |
| Elvis Barah | Evaluation & Feature Importance |
git clone https://github.com/SaranyaNarayana/diabetes-ml-project.git
cd diabetes-ml-projectjupyter notebook