Skip to content

syedsaadali11/DiabeticPredictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 Diabetic Predictor

A production-grade Django-based web app that predicts whether a user is Diabetic, Pre-Diabetic, or Non-Diabetic based on healthcare and lifestyle inputs. The backend is powered by an optimized Ensemble Machine Learning Model combining CatBoost, XGBoost, and LightGBM, trained on a large real-world medical dataset.


πŸ“Š Dataset

Source: CDC Diabetes Health Indicators Dataset (UCI)

  • Records: 253,680 entries
  • Features: 35 total (22 selected for prediction)
  • Target Variable: Diabetes_012
    • 0 = No Diabetes
    • 1 = Pre-Diabetes
    • 2 = Diabetes

🎯 Project Objective

To provide an accessible and intelligent diabetes screening tool for the general public that can:

  • Collect user health and lifestyle indicators through a simple web interface
  • Predict the likelihood of having diabetes using an advanced ML ensemble
  • Support decision-making with high accuracy and transparency

πŸš€ Features

  • 🧠 ML Ensemble Model using:
    • CatBoostClassifier
    • XGBClassifier
    • LGBMClassifier
  • βš–οΈ Ensemble Weighting
    • CatBoost: 0.780
    • XGBoost: 0.102
    • LightGBM: 0.118
  • πŸ” Threshold Calibration
    • Pre-Diabetes Threshold: 0.001
    • Diabetes Threshold: 0.050
  • πŸ“ˆ Performance
    • Accuracy: 89.6%
    • ROC-AUC: 0.98
    • F1-score (Class 2 - Diabetes): 0.95
  • πŸ–₯️ User Interface
    • Step-by-step health questionnaire
    • Secure user login/signup
    • Final diagnosis view: No Diabetes, Pre-Diabetes, or Diabetes

πŸ› οΈ Tech Stack

Area Tools / Frameworks
Web Framework Django 5.1.3
ML Models CatBoost, XGBoost, LightGBM
Preprocessing scikit-learn, imbalanced-learn, SMOTE, StandardScaler
Hyperparameter Tuning Optuna
Dataset CDC Diabetes Health Indicators Dataset (UCI)
Language Python 3.11

πŸ” App Walkthrough (Screenshots)

πŸ‘€ Login Page

Login

🧭 Home Screen

Home

❓ Sample Questions

Question 1 Question 2

βœ… Sample Results

Result: No Diabetes Result: Pre-Diabetes Result: Diabetes

🏁 Finish Screen

Finish



πŸ“¬ Contact

For feedback, suggestions, or collaboration:


About

🩺 Diabetic Predictor is a Django-based ML app that screens diabetes risk using an ensemble of CatBoost, XGBoost & LightGBM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors