Predictive model and risk analysis for diabetic retinopathy using machine learning: a retrospective cohort study in China

BMJ Open. 2021 Nov 26;11(11):e050989. doi: 10.1136/bmjopen-2021-050989.

Abstract

Objective: Aiming to investigate diabetic retinopathy (DR) risk factors and predictive models by machine learning using a large sample dataset.

Design: Retrospective study based on a large sample and a high dimensional database.

Setting: A Chinese central tertiary hospital in Beijing.

Participants: Information on 32 452 inpatients with type-2 diabetes mellitus (T2DM) were retrieved from the electronic medical record system from 1 January 2013 to 31 December 2017.

Methods: Sixty variables (including demography information, physical and laboratory measurements, system diseases and insulin treatments) were retained for baseline analysis. The optimal 17 variables were selected by recursive feature elimination. The prediction model was built based on XGBoost algorithm, and it was compared with three other popular machine learning techniques: logistic regression, random forest and support vector machine. In order to explain the results of XGBoost model more visually, the Shapley Additive exPlanation (SHAP) method was used.

Results: DR occurred in 2038 (6.28%) T2DM patients. The XGBoost model was identified as the best prediction model with the highest AUC (area under the curve value, 0.90) and showed that an HbA1c value greater than 8%, nephropathy, a serum creatinine value greater than 100 µmol/L, insulin treatment and diabetic lower extremity arterial disease were associated with an increased risk of DR. A patient's age over 65 was associated with a decreased risk of DR.

Conclusions: With better comprehensive performance, XGBoost model had high reliability to assess risk indicators of DR. The most critical risk factors of DR and the cut-off of risk factors can be found by SHAP method to render the output of the XGBoost model clinically interpretable.

Keywords: diabetes & endocrinology; diabetic retinopathy; statistics & research methods.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • China / epidemiology
  • Diabetes Mellitus*
  • Diabetic Retinopathy* / diagnosis
  • Diabetic Retinopathy* / epidemiology
  • Humans
  • Machine Learning
  • Reproducibility of Results
  • Retrospective Studies
  • Risk Assessment