Machine Learning-Based Early Detection of Diabetes Mellitus: An Ensemble Framework Enhanced with Explainable AI and Ablation Study
Main Article Content
Abstract
Diabetes mellitus is a chronic metabolic condition which is frequently diagnosed late resulting in serious conditions such as cardiovascular disease, nephropathy, neuropathy, retinopathy etc. Current machine learning diabetes risk prediction methods focus on the accuracy of classification and ignore the problem of class imbalance, feature redundancy, probability calibration and interpretability, which are all important for clinical adoption. The study suggests an eight-stage machine learning approach that includes data acquisition, data pre-processing, balancing techniques (SMOTE), feature selection (RFECV and mutual information), ensemble modelling (Random Forest, XGBoost and LightGBM), probability calibration, explainability (SHAP) and three-level risk stratification. The Random Forest model outperformed all other models on the hold-out data (accuracy = 75.9%, AUC = 0.817) with relatively well-calibrated probabilities, whereas a stacked ensemble model had similar discrimination (AUC = 0.816). The results of the ablation analysis demonstrated that the recall value could be enhanced from 59.3% to 68.3% with slightly decreased precision value by using SMOTE, while the feature scaling method had little impact on the Random Forest model, aggressive feature reduction with RFECV (8→4 features) reduced the AUC value from 0.822 to 0.787, and stacking did not significantly improve the performance of the model compared to the best base learner based on the limited number of samples (n = 768). Significant differences in key performance measures were confirmed by statistical validation using DeLong, Wilcoxon signed-ranked tests and Friedman–Nemenyi tests, and glucose level, BMI and age were the most influential predictors, as would be known from clinical experience, were found using SHAP analysis. The proposed approach combines ensemble learning, calibration, interpretability, and statistically strong validation, making diabetes risk prediction more of a transparent and clinically interpretable decision support tool for early risk assessment instead of a black box approach.
