Zing Forum

Reading

Diabetes-Prediction-ML: A Complete Multi-End Diabetes Prediction System

A machine learning-based diabetes risk assessment system with three interaction modes: desktop application, Web interface, and RESTful API. It uses SMOTE to handle data imbalance issues, and the decision tree model achieves an accuracy of 78.2%

机器学习糖尿病预测医疗AI决策树SMOTEFlaskPython健康科技
Published 2026-06-17 08:15Recent activity 2026-06-17 08:18Estimated read 6 min
Diabetes-Prediction-ML: A Complete Multi-End Diabetes Prediction System
1

Section 01

Diabetes-Prediction-ML: A Complete Multi-End Diabetes Prediction System (Introduction)

This project is a machine learning-based diabetes risk assessment system with three interaction modes: desktop application, Web interface, and RESTful API. It uses SMOTE to handle data imbalance issues, and the decision tree model achieves an accuracy of 78.2%. Key basic information: Maintained by Ahmed Elsaadany (@A7medElsaadany), hosted on GitHub (original link: https://github.com/A7medElsaadany/Diabetes-Prediction-ML), released on June 17, 2026.

2

Section 02

Project Background & Origin

Diabetes is one of the most common chronic diseases globally, and early detection is crucial for improving patient prognosis. This project provides a complete machine learning solution for diabetes risk assessment. Origin details: Maintained by Ahmed Elsaadany (@A7medElsaadany), source platform is GitHub, original title is Diabetes-Prediction-ML, released on June 17, 2026.

3

Section 03

Technical Architecture & Interaction Modes

The project adopts a modular design, decoupling the machine learning core from multiple user interfaces. Three interaction modes:

  1. Desktop application (Tkinter GUI): Built with Python's Tkinter library, has 8 input fields covering key medical indicators like blood glucose and blood pressure, supports real-time result return and dark theme.
  2. Web interface (Flask): Responsive Web app using Flask 3.0.0, optimized for mobile devices, with features like real-time prediction and animated confidence bar.
  3. RESTful API: Provides POST /predict endpoint with JSON support and CORS configuration, enabling integration with third-party systems like hospital information systems and health management apps.
4

Section 04

Machine Learning Pipeline Details

Data Preprocessing: Uses SMOTE to handle class imbalance (health samples are more than disease samples) and StandardScaler for feature standardization. Model Selection: Compared 7 algorithms (Logistic Regression, SVM, KNN, Decision Tree, Naive Bayes, Random Forest, Gradient Boosting), and selected Decision Tree for balanced performance. Performance Metrics:

Metric Score
Accuracy 78.2%
Precision 76.5%
Recall 79.1%
F1 Score 77.8%
5

Section 05

Technical Dependencies & Model Explainability

Toolchain:

Component Tech Stack
Backend API Flask 3.0.0
Machine Learning Scikit-learn 1.8.0
Data Processing Pandas, NumPy
Data Balance Imbalanced-learn (SMOTE)
Visualization Matplotlib
Desktop GUI Tkinter
Web Frontend HTML5, CSS3, JavaScript
Model Serialization Joblib
Explainability: Includes feature importance analysis to help understand prediction factors, which is critical for medical AI applications (building trust with doctors and patients, supporting medical research).
6

Section 06

Application Scenarios & Deployment Notes

Application Scenarios:

  1. Community health screening (identify high-risk groups)
  2. Medical institution auxiliary diagnosis (provide second opinion)
  3. Health management app integration (via API)
  4. Medical education (typical case of ML in healthcare) Deployment Notes: The prediction results are for reference only and cannot replace professional medical diagnosis (model trained on historical data, may not cover all individual differences and special cases).
7

Section 07

Summary & Future Outlook

The Diabetes-Prediction-ML project demonstrates a complete ML application development process from data preprocessing and model training to multi-platform deployment, providing valuable reference for medical AI engineering. Highlights: Multi-end delivery (same core logic for different user groups). Future improvements: Introduce deep learning models, add more feature dimensions, support online model updates, and add model drift detection mechanisms.