Explainable Diabetes Classification Using Machine Learning Algorithm and SHAP Analysis on Clinical Laboratory Data - Siti Agus Kartini; Muhammad Fauzi; Riki Winanjaya (Forum Kerjasama Pendidikan Tinggi, 2026)
Diabetes mellitus is a chronic metabolic disorder that continues to pose significant health challenges worldwide due to its increasing prevalence and potential complications. Early and accurate identification of diabetes is essential to support timely intervention and effective disease management. Recent advances in machine learning have enabled the development of intelligent classification systems; however, many predictive models still suffer from limited interpretability, reducing their applicability in clinical environments. Therefore, this study proposes an explainable diabetes classification framework using machine learning algorithms and SHapley Additive exPlanations (SHAP) analysis on clinical laboratory data. The dataset consists of 1,000 patient records containing demographic and laboratory attributes, including age, gender, glycated hemoglobin (HbA1c), cholesterol, triglycerides, lipoprotein levels, creatinine, urea, and body mass index (BMI). Four machine learning algorithms, namely Decision Tree, Random Forest, Support Vector Machine (SVM), and Extreme Gradient Boosting (XGBoost), were developed and evaluated. The performance of each model was assessed using Accuracy, Precision, Recall, F1-Score, Classification Report, and Confusion Matrix. Experimental results indicate that Random Forest and XGBoost achieved the highest classification accuracy of 98.5%, outperforming Decision Tree (98.0%) and SVM (94.5%). Due to its strong predictive capability and compatibility with explainable artificial intelligence techniques, XGBoost was selected for further SHAP analysis. The SHAP results successfully identified the most influential features contributing to diabetes classification and provided transparent explanations regarding model predictions. The proposed framework demonstrates that combining machine learning algorithms with explainable artificial intelligence improves predictive accuracy and interpretability, supporting reliable clinical decision-making for diabetes diagnosis.