• Home
  • DTx
  • Early Type 2 diabetes risk prediction using explainable machine learning in a two-stage approach

BackgroundDiabetes is a chronic disease characterized by elevated blood glucose levels. Without early detection and proper management, it can lead to serious complications and increase healthcare costs. Its global prevalence is rising, with many cases remaining undiagnosed. In this study, we developed an explainable machine learning model using a two-stage approach for predicting diabetes.MethodsFive machine learning (ML) models, including Multi-Layer Perceptron, Support Vector Machine, K-Nearest Neighbor, Extreme Gradient Boosting (XGBoost), and Naïve Bayes, were trained and evaluated using a two-stage approach. In Stage one, a public dataset containing 520 samples was used, and Shapley Additive exPlanations (SHAP) and MLP weights were applied for feature selection. In Stage two, the same models were trained and evaluated using a dataset of 270,943 samples collected from Rwanda. SHAP was further employed to explain the model output.ResultsIn Stage one, the Multi-Layer Perceptron model achieved the best performance on a public dataset, with an accuracy of 95.19%. Feature selection techniques identified the top 10 influential predictors associated with diabetes risk, including those recommended by diabetes care providers in Rwanda. In Stage two, the XGB model outperformed other models, achieving an accuracy of 97.14%.ConclusionThis study presents a two-stage, explainable machine learning framework for systematic screening for type 2 diabetes. The first stage evaluates risk based on reported symptoms, while the second stage incorporates demographic, anthropometric, and vital sign data for refined risk assessment. Integration of these models into the mUzima mobile application can enhance community health workers’ capacity to identify and refer high-risk individuals. By enabling early and accurate detection, the proposed approach has the potential to reduce undiagnosed diabetes and support improved disease management.

Subscribe for Updates

Copyright 2025 dijee Intelligence Ltd.   dijee Intelligence Ltd. is a private limited company registered in England and Wales at Media House, Sopers Road, Cuffley, Hertfordshire, EN6 4RY, UK registration number 16808844