About the project

A machine-learning system fordiabetes risk estimation.

DiabetesAI is an end-to-end machine-learning project that combines a trained classification model, a FastAPI backend, and a Next.js frontend.

Dataset
768
patient records
Features
8
input variables
ROC-AUC
81.86%
held-out test set
Recall
74.07%
positive class
01 · DATA

Dataset

The model uses eight patient-level input variables and predicts the binary target column provided by the dataset.

Pregnancies
Glucose
Blood Pressure
Skin Thickness
Insulin
BMI
Diabetes Pedigree
Age
02 · PIPELINE

Preprocessing

Some physiological fields contain zero values that are treated as missing measurements. The saved preprocessing pipeline handles missing values with median imputation and then standardizes the numeric features.

01
Missing-value handling
Median imputation
02
Feature scaling
StandardScaler
03
Classification
Gradient Boosting
03 · MACHINE LEARNING

Model

The final candidate uses Gradient Boosting with hyperparameters selected through cross-validation and grid search on the training data.

ParameterValue
Estimators100
Learning rate0.10
Max depth1
Min samples leaf2
Min samples split2
04 · PERFORMANCE

Evaluation

The model was evaluated on a held-out test set after model selection. The classification threshold was selected using out-of-fold predictions from the training data.

Accuracy
75.32%
Precision
62.50%
Recall
74.07%
F1
67.80%
ROC-AUC
81.86%
Threshold
34.3%
System architecture

From patient input to prediction.

01
Next.js
User input
02
FastAPI
API validation
03
ML Pipeline
Prediction
04
Probability
Risk estimate
05
Frontend
Result display
Important

This project is an educational machine-learning application. Its predictions are statistical model outputs and should not be interpreted as a medical diagnosis or as a substitute for professional medical advice.