Predicting diabetic retinopathy based on routine laboratory tests by machine learning algorithms
- PMID: 40102923
- PMCID: PMC11921716
- DOI: 10.1186/s40001-025-02442-5
Predicting diabetic retinopathy based on routine laboratory tests by machine learning algorithms
Abstract
Objectives: This study aimed to identify risk factors for diabetic retinopathy (DR) and develop machine learning (ML)-based predictive models using routine laboratory data in patients with type 2 diabetes mellitus (T2DM).
Methods: Clinical data from 4259 T2DM inpatients at Beijing Tongren Hospital were analyzed, divided into a model construction data set (N = 3936) and an external validation data set (N = 323). Using 39 optimal variables, a prediction model was constructed using the eXtreme Gradient Boosting (XGBoost) algorithm and compared with four other algorithms: support vector machine (SVM), gradient boosting decision tree (GBDT), neural network (NN), and logistic regression (LR). The Shapley Additive exPlanation (SHAP) method was employed to interpret the XGBoost model. External validation was performed to assess model performance.
Results: DR was present in 47.69% (N = 1877) of T2DM patients in the model construction data set. Among the models tested, the XGBoost model performed best with an AUC of 0.831, accuracy of 0.757, sensitivity of 0.754, specificity of 0.759, and F1-score of 0.752. SHAP explained feature importance for XGBoost model and identified key risk factors for DR. External validation yielded an accuracy of 0.650 for the XGBoost model.
Conclusions: The XGBoost-based prediction model effectively assesses DR risk in T2DM patients using routine laboratory data, aiding clinicians in identifying high-risk individuals and guiding personalized management strategies, especially in medically underserved areas.
Keywords: Diabetic retinopathy; Machine learning; Predictive model; Routine laboratory tests; Type 2 diabetes mellitus; XGBoost.
© 2025. The Author(s).
Conflict of interest statement
Declarations. Ethics approval and consent to participate: This study was approved by the ethics committee of Beijing Tongren Hospital, Capital Medical University (No. TREC2024-KY040). Human ethics and consent to participate: Every human participant agreed to participate in the study and signed an informed consent form. Competing interests: The authors declare no competing interests.
Figures








References
-
- Vision Loss Expert Group of the Global Burden of Disease Study; GBD. Blindness and Vision Impairment Collaborators (2024) Global estimates on the number of people blind or visually impaired by diabetic retinopathy: a meta-analysis from 2000 to 2020. Eye (Lond). 2019;38(11):2047–57. 10.1038/s41433-024-03101-5. - PMC - PubMed
-
- Teo ZL, Tham YC, Yu M, Chee ML, Rim TH, Cheung N, et al. Global prevalence of diabetic retinopathy and projection of burden through 2045: systematic review and meta-analysis. Ophthalmology. 2021;128(11):1580–91. 10.1016/j.ophtha.2021.04.027. - PubMed
-
- Chinese Diabetes Society. Guideline for the prevention and treatment of type 2 diabetes mellitus in China (2020 edition). Chin J Diabetes Mellit. 2021;13(4):315–409. 10.3760/cma.j.cn115791-20210221-00095.
-
- Fundus Disease Group of Ophthalmological Society of Chinese Medical Association, Fundus Disease Group of Ophthalmologist Branch of Chinese Medical Doctor Association. Evidence-based guidelines for diagnosis and treatment of diabetic retinopathy in China (2022). Chin J Ocul Fundus Dis. 2023;39(2):99–124. 10.3760/cma.j.cn511434-20230110-00018.
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources
Medical