This MATLAB-based Project implements a diabetes prediction system using machine learning and an intuitive graphical user interface (GUI). Designed as part of a college assignment, it empowers users to quickly assess diabetes risk based on simple health metrics.
To build an accessible, early-stage diabetes risk predictor using the Pima Indian Diabetes Dataset, making health screening more scalable and user-friendly — especially for remote or underserved areas.
- MATLAB (for scripting and GUI)
- Statistics and Machine Learning Toolbox
- Random Forest (Bagged Trees Classifier)
- GUI designed using
uicontrolanduipanel
The Pima Indian Diabetes dataset (from Kaggle) includes 768 patient records with 9 key medical attributes:
- Pregnancies, Glucose, Blood Pressure, Skin Thickness, Insulin, BMI
- Diabetes Pedigree Function, Age
- Outcome (0 = Non-diabetic, 1 = Diabetic)
- Missing values (e.g., Insulin, Skin Thickness) replaced with averages.
- Z-score normalization applied to input features.
- Random Forest (Bagged Ensemble) classifier chosen for its robustness with tabular data.
- Trained on 70% of the dataset using
cvpartitionin MATLAB.
- BMI is auto-computed from user-entered weight and height.
- GUI dynamically adjusts input fields (e.g., pregnancies only shown for female users).
Three interactive pages:
- User Info: Name, Age, Gender
- Health Data: Glucose, Blood Pressure, Weight, Height, Insulin, Pregnancies
- Family History (optional)
Color-coded messages and a refresh button enhance usability.
- Core script:
DiabetesPredictorUI.m - Full input validation, auto-calculated BMI, and clear result display.
- Result shown as High Risk / Low Risk, with recommendations if needed.
- Accurately flags diabetes likelihood from user inputs.
- Enhances medical accessibility through digital tools.
- Clone/download this repository.
- Open MATLAB and navigate to the project folder.
- Run
DiabetesPredictorUI.m. - Input sample data via GUI to get predictions.
For questions or collaboration:
Email: rishabhrsingh19@gmail.com
Linkedin: https://www.linkedin.com/rishabh-ranjan-singh


