Author: Soroush Soltanizadeh Google Scholar: Profile
Diabetes is a life-threatening chronic condition with the potential to cause heart disease, nerve damage, and organ failure. Early and efficient diagnosis of Type 2 Diabetes is essential for preventing complications. This project introduces a low-complexity deep learning model a 1D Convolutional Neural Network (CNN) that offers high accuracy and can be embedded in wearable devices or IoT-based health monitoring systems.
The main goal of this project is to balance model accuracy and computational complexity. We conduct an accuracy-complexity trade-off study to design a CNN-based model that is lightweight yet highly effective for real-world diabetes diagnosis applications.
-
Name: PIMA Indian Diabetes Dataset (PIDD)
-
Source: Publicly available through Kaggle
-
Target:
Outcome
(1 = Diabetic, 0 = Non-diabetic) -
Features: 8 clinical parameters including:
- Pregnancies
- Glucose
- BloodPressure
- SkinThickness
- Insulin
- BMI
- DiabetesPedigreeFunction
- Age
- Conv1D Layer: 128 filters, kernel size = 5, padding = "same"
- MaxPooling Layer: pool size = 3
- Flatten Layer
- Dropout Layer: rate = 0.05
- Dense Layer: 1 neuron, sigmoid activation
Model Summary:
Input Shape → (8, 1)
Conv1D → filters=128, kernel=5
MaxPooling1D → pool_size=3
Dropout → rate=0.05
Dense → units=1, activation='sigmoid'
- Optimizer: Adam (
learning_rate=0.01
) - Loss Function: Binary Crossentropy
- Evaluation: 10-fold Cross-Validation
- Early Stopping: Patience = 150 epochs
- Batch Size: 64
- Epochs: 200 (with early stopping)
Metric | Value |
---|---|
Mean Accuracy | 93.89% |
Standard Deviation | ~ small |
Model Complexity (Ops) | Computed as:ni * nf * nk * (ns + 2*npad - dilation*(nk-1) - 1 / stride + 1) |
Complexity (CCNN) | ≈ (Computed Value) |
🧠 The model balances precision and low complexity, making it ideal for real-time, edge, and embedded systems.
An empirical study was conducted to compare various deep learning models, including:
- CNN
- MLP
- CNN + MLP Hybrid
The CNN+MLP hybrid model yielded the highest performance with an accuracy of 93.89%, outperforming all other models tested.
- Wearable Health Devices
- Mobile Diagnostic Apps
- IoT-Based Patient Monitoring Systems
- Embedded AI in Smart Clinics
pip install tensorflow numpy pandas matplotlib scikit-learn
python diabetes_diagnosis_cnn.py
- Extend the model to multi-disease detection
- Integrate SHAP or LIME for interpretability
- Deploy the model in an Android/iOS app
- Real-time API deployment for clinical use
This project is licensed under the MIT License. You're free to use, modify, and distribute it.