Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🩺 Explainable AI for Diabetes Risk Stratification

Multi-class diabetes prediction framework combining supervised learning (Logistic Regression, XGBoost, MLP, LSTM), unsupervised clustering (K-Means), and Explainable AI (SHAP).

Dataset Paper Python

📊 Key Features

  • 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

🎯 Results

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

🚀 Quick Start

1. Clone repository

git clone https://github.com/BhanuTejaMalineni/Diabetes-Risk-Stratification-ML.git
cd Diabetes-Risk-Stratification-ML

2. Install dependencies

pip install -r requirements.txt

Required packages:

  • pandas, numpy, scikit-learn
  • xgboost, tensorflow
  • shap (for explainability)
  • matplotlib, seaborn
  • jupyter, ipywidgets

3. Download dataset

Get Diabetes Health Indicators (BRFSS 2015) from Kaggle
→ Save CSV to ./data/ folder

4. Run notebooks

jupyter lab
# Open notebooks in Code Snippet/ folder

📁 Project Structure

├── Code Snippet/         # Jupyter notebooks (analysis & models)
├── Machine_Learning_Project.pdf  # Full research paper
├── requirements.txt      # Python dependencies
├── .gitignore
└── README.md

🔬 Methodology

Unsupervised Learning

  • K-Means Clustering (K=4) to identify patient profiles
  • High-risk Cluster 3: High BP, BMI>40, poor GenHlth, Age>60

Supervised Learning

  • Binary Classification: Diabetes vs. No Diabetes
  • Multi-class: No Diabetes (0), Prediabetes (1), Diabetes (2)
  • Models: Logistic Regression, XGBoost, MLP, LSTM

Explainability

  • SHAP values for feature importance
  • Top predictors: GenHlth, HighBP, Age, BMI

📈 Key Findings

  • 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

📄 Full Report

Detailed methodology, results, and analysis: Machine_Learning_Project.pdf

🛠️ Tech Stack

Python TensorFlow XGBoost scikit--learn SHAP

📚 Dataset

BRFSS 2015 - Behavioral Risk Factor Surveillance System (CDC)

  • 253,680 survey responses
  • 21 health-related features
  • Class imbalance: 84% No Diabetes, 16% Prediabetes/Diabetes

🎓 Academic Context

MSc Software Engineering Project
University of Europe for Applied Sciences
Potsdam, Germany

📧 Contact

Bhanu Teja Malineni
LinkedIn | GitHub


⭐ If you find this project helpful, please star the repository!

About

Explainable AI framework for diabetes prediction using XGBoost, LSTM, K-Means clustering, and SHAP (BRFSS dataset)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages