Multi-class diabetes prediction framework combining supervised learning (Logistic Regression, XGBoost, MLP, LSTM), unsupervised clustering (K-Means), and Explainable AI (SHAP).
- 3-class risk stratification: No Diabetes, Prediabetes, Diabetes
- 4 ML models compared: Logistic Regression, XGBoost, MLP, LSTM
- K-Means patient profiling: Identified high-risk cluster (Cluster 3)
- SHAP explainability: GenHlth, HighBP, Age, BMI top predictors
- Interactive UI: Real-time risk prediction with ipywidgets
| Model | F1-Score | AUC-ROC |
|---|---|---|
| Logistic Regression | 0.47 | 0.82 |
| XGBoost | 0.47 | 0.82 |
| MLP | 0.46 | 0.82 |
| LSTM | 0.47 | 0.82 |
git clone https://github.com/BhanuTejaMalineni/Diabetes-Risk-Stratification-ML.git
cd Diabetes-Risk-Stratification-MLpip install -r requirements.txtRequired packages:
- pandas, numpy, scikit-learn
- xgboost, tensorflow
- shap (for explainability)
- matplotlib, seaborn
- jupyter, ipywidgets
Get Diabetes Health Indicators (BRFSS 2015) from Kaggle
→ Save CSV to ./data/ folder
jupyter lab
# Open notebooks in Code Snippet/ folder├── Code Snippet/ # Jupyter notebooks (analysis & models)
├── Machine_Learning_Project.pdf # Full research paper
├── requirements.txt # Python dependencies
├── .gitignore
└── README.md
- K-Means Clustering (K=4) to identify patient profiles
- High-risk Cluster 3: High BP, BMI>40, poor GenHlth, Age>60
- Binary Classification: Diabetes vs. No Diabetes
- Multi-class: No Diabetes (0), Prediabetes (1), Diabetes (2)
- Models: Logistic Regression, XGBoost, MLP, LSTM
- SHAP values for feature importance
- Top predictors: GenHlth, HighBP, Age, BMI
- Logistic Regression achieved best F1-Score (0.47) with balanced precision/recall
- All models reached ~0.82 AUC-ROC, indicating strong discrimination
- Unsupervised clustering successfully identified clinically relevant high-risk profiles
- SHAP analysis confirms predictions align with established medical risk factors
Detailed methodology, results, and analysis: Machine_Learning_Project.pdf
BRFSS 2015 - Behavioral Risk Factor Surveillance System (CDC)
- 253,680 survey responses
- 21 health-related features
- Class imbalance: 84% No Diabetes, 16% Prediabetes/Diabetes
MSc Software Engineering Project
University of Europe for Applied Sciences
Potsdam, Germany
Bhanu Teja Malineni
LinkedIn | GitHub
⭐ If you find this project helpful, please star the repository!