Skip to content
Open access

A comparative and interpretable machine learning framework for reliable diabetes risk prediction.

Jul 2026 · Scientific Reports · 0 citations
Medicine

TL;DR

It is indicated that a rigorously conducted methodology and interpretability in machine learning development are crucial in creating machine learning solutions in healthcare decision support, which is the pathway to real applications in diabetes risk assessment.

Abstract

Diabetes mellitus is a common type of metabolic illness that is very common worldwide, and in most cases, it results in serious effects like heart disease, kidney disease, and blindness. Proper and early diagnosis of diabetes is essential to intervene on time and have better patient outcomes. Machine learning (ML) paradigms provide effective predictive modeling solutions to healthcare, but most of the current literature is limited due to imbalanced datasets, using a single training test split, and limited model interpretability, which diminish their clinical usability. This research paper has introduced a powerful and explainable ML model to predict diabetes based on the Pima Indians Diabetes Dataset acquired via Kaggle, which contains 768 patients with eight clinical variables and a binary response. To counter the class imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) is used to create natural synthetic samples of the minority diabetic group that facilitate balanced learning without degrading the correlations between the features. Four classifiers, including Logistic Regression, Naive Bayes, AdaBoost, and XG Boost, are trained and tested. The stratified 10-fold cross-validation is used to provide a stable and generalizable model performance, as opposed to using only one data split. The measurement criteria are accuracy, precision, recall, and F1-score, especially for the minority diabetic class. The interpretation of the model is improved by the use of logistic regression coefficients and SHAP (SHapley Additive exPlanations) values, as they allow transparent identification of clinical features that are critical to making predictions. The results of the experiment show that the suggested framework attains an overall accuracy of approximately 94% on an unseen test set, with strong precision and recall of the minority class, thus proving that the combination of class balancing, cross-validation, and explainable ML results in the outcomes of reliable and clinically credible predictions. All performance results are evaluated on an untouched original test set, while SMOTE is applied strictly within cross-validation folds to prevent data leakage. Unlike many existing studies, the proposed framework ensures leakage-free validation, robust cross-validation, and integrated interpretability for clinically meaningful prediction. Although synthetic sampling improves minority class learning, the model is evaluated carefully to ensure generalization on real-world data. This paper indicates that a rigorously conducted methodology and interpretability in machine learning development are crucial in creating machine learning solutions in healthcare decision support, which is the pathway to real applications in diabetes risk assessment.

Read PDF

Similar papers

Diabetes Prediction Using Machine Learning Model: A comparative Approach

Six supervised learning models were developed and compared for diabetes prediction using a dataset and compared for diabetes prediction using a 100k patients records with eight clinical features including gender, age, hypertension, smoking history, heart disease, BMI, HbA1c level, and blood glucose level.

Akshay Bhardwaj, Rajesh Chauhan, Devansh Khajuria · 0 citations
Open access Jul 2026

An interpretable machine learning framework for early-stage diabetes mellitus prediction using comparative classification models and SHAP

A machine learning-based framework enhanced with explainability is introduced, built around a structured data preparation process that handles categorical encoding, numerical scaling, and minority class oversampling through the SMOTE technique, positioning it as a trustworthy tool for assisting medical professionals in data-driven clinical decision-making.

N. J, Deekshitha U, K. V · 0 citations
Review Open access Jul 2026

Explainable AI-Based Diabetes Mellitus Risk Prediction Using Naive Bayes and Support Vector Machine

Diabetes Mellitus (DM) is a chronic metabolic disease that continues to increase globally and requires effective early detection to reduce the risk of serious complications. Machine learning has been widely adopted as an approach for predicting diabetes risk; however, most existing models are still black-box in nature, making them difficult to interpret and less useful for clinical decision-making. In addition, the problem of class imbalance in medical datasets often causes models to be biased toward the majority class, reducing their sensitivity in detecting high-risk patients. This study aims to develop and compare diabetes risk prediction models using the Naive Bayes and Support Vector Machine (SVM) algorithms with an Explainable Artificial Intelligence (XAI) approach. Class imbalance was addressed using the Synthetic Minority Over-sampling Technique (SMOTE) applied to the training data. Interpretability was analyzed using SHAP (SHapley Additive exPlanations) for global feature importance and LIME (Local Interpretable Model-agnostic Explanations) for local instance-level explanations. The dataset used was the Diabetes Health Indicators Dataset from the BRFSS 2015 survey, publicly available on Kaggle, with a sample of 50,000 records and 22 variables. Evaluation results showed that SVM achieved an accuracy of 84.17%, while Naive Bayes achieved a higher recall of 77.76%, indicating better sensitivity in detecting diabetes cases. SHAP analysis identified GenHlth, HighBP, BMI, HighChol, and Age as the most influential risk factors globally, while LIME provided individual-level explanations. This research contributes a prediction model that is not only accurate but also transparent and clinically interpretable.

Putu Hawariyah, Sudin Saepudin, Gina Syabani Yuda · 0 citations
Open access Aug 2026

A Comparative Evaluation of Machine Learning Algorithms for Diabetes Risk Prediction

Diabetes mellitus is a chronic metabolic disorder whose global prevalence continues to rise, creating an urgent need for scalable, low-cost tools for early risk identification. This study evaluates the effectiveness of five machine learning algorithms (Random Forest, XGBoost, Support Vector Machine [SVM], CatBoost, and TabNet) for predicting diabetes risk from routinely available clinical and lifestyle variables. Using the Pima Indians Diabetes dataset, a preprocessing pipeline was applied that included median imputation of physiologically implausible zero values, standardized (Z-score) feature scaling, Boruta-based feature selection, and class-imbalance handling through class-weight adjustment and the Synthetic Minority Oversampling Technique (SMOTE). Models were trained on an 80/20 train-test split and assessed using accuracy, precision, recall, F1-score, and the area under the receiver operating characteristic curve (ROC-AUC). Random Forest achieved the strongest overall performance (accuracy 0.753; F1-score 0.689; ROC-AUC 0.810), followed by CatBoost, SVM, and XGBoost, whereas TabNet performed worst with very low recall for the diabetic class. The best-performing model (Random Forest) was deployed in a lightweight Flask web application that returns a probability-based diabetes risk assessment, categorising each prediction as low, moderate, or high risk together with a tailored recommendation. The findings confirm that ensemble tree-based methods, particularly Random Forest, provide a reliable, interpretable, and deployable basis for diabetes risk screening, especially in resource-constrained settings. Key limitations include dataset homogeneity, residual class imbalance, and limited feature coverage.

T. Olayinka · 0 citations
Open access 2026

A Comparative Evaluation of Various Machine Learning Techniques for Prediction of Type 2 Diabetes Mellitus

Diabetes affects over 101 million people in India, with many more at risk due to routine and hereditary factors. Early diagnosis is crucial to prevent complications, which make accurate predictive tools essential in healthcare. This research uses Machine Learning (ML) algorithms to evaluate the likelihood of Type 2 Diabetes Mellitus (T2DM) using lifestyle and family history data. The trained models demonstrate strong predictive ability, allowing individuals to self-assess their risk and supporting healthcare professionals in early detection and intervention. This study presents a performance assessment of seven ML classifiers: Decision Tree (DT), Random Forest (RF), Support Vector Machine (SVM), Logistic Regression (LR), Naïve Bayes (NB), k-Nearest Neighbor (k-NN), and Extreme Gradient Boosting (XGBoost). These classifiers were applied to the widely used PIMA Indian Diabetes dataset (PIDD), which contains 768 clinical records of adult women aged 21 and above, providing key medical information for diabetes analysis. Multiple evaluation measures were applied to assess model performance with results showing that SVM achieved the highest accuracy and AUC, while LR, RF, and XGBoost also performed competitively. Although k-NN attained the highest recall, it yielded a higher false positive rate. These findings highlight that no single model is perfect for every situation, and the choice of classifier should match clinical needs. This study serves as a reference for ML applications in diabetes prediction.

Rizwan Akhtar, Muhammad Kalamuddin Ahamad · 0 citations
Open access Jul 2026

A data-driven machine learning model for effective diabetes diagnosis

Diabetes is a prevalent long-lasting disease marked by high blood glucose due to inadequate insulin secretion and insulin resistance may result in serious life-threatening complications. Diabetes global prevalence has raised by fourfold over the past thirty years, and is the ninth foremost disease leads to death across the globe. Meanwhile, developments in machine learning presents new opportunities for prediction and classification of disease. However, despite of numerous existing models, a need for classifying types of diabetes still remains. The objective of this study is to develop an integrated, data-driven machine learning model for predicting the occurrence and classification of diabetes in an effort to improve on these limitations and investigate the ability to differentiate between types of diabetes through machine learning approach. To evaluate the proposed framework for classification of diabetes and its subtypes, publicly accessible diabetes-related datasets were employed for model development and evaluation. Binary classification is used for detecting occurrence of diabetes, while multiclass classification was employed for subtype classification, namely Prediabetes(PD), Type 1 Diabetes(T1D), Type 2 Diabetes(T2D), and Pancreatogenic (Type 3c-T3cD) Diabetes. K-Nearest Neighbors (KNN), Logistic Regression, Naive Bayes, Random Forest, and XGBoost machine learning algorithms were implemented. The XGBoost demonstrated the highest performance among all models with an accuracy of 0.97. Its feature importance scores validated predictive accuracy and to identify key factors that distinguish types of diabetes. The proposed model is intended to serve as a decision-support system for screening and classification tool using routine clinical data to facilitate early diagnosis and treatment planning.

T. Shobha, S. Pradeep, Seema Patil et al. · 0 citations