Prediction of retinopathy through machine learning in diabetes mellitus


Keçeli T., İlhanlı N., Gülkesen K. H.

Journal of health sciences and medicine (Online), cilt.7, sa.4, ss.467-471, 2024 (Hakemli Dergi) identifier

Özet

Aims: Development of a machine learning model on an electronic health record (EHR) dataset for predicting retinopathy in people with diabetes mellitus (DM), analysis of its explainability. Methods: A public dataset based on EHR records of patients diagnosed with DM located in İstanbul, Turkiye (n=77724) was used. The categorical variable indicating a retinopathy-positive diagnosis was chosen as the target variable. Variables were preprocessed and split into training and test sets with the same ratio of class distribution for model training and evaluation respectively. Four machine learning models were developed for comparison: logistic regression, decision tree, random forest and eXtreme Gradient Boosting (XGBoost). Each algorithm’s optimal hyperparameters were obtained using randomized search cross validation with 10-folds followed by the training of the models based on the results. The receiver operating characteristic (ROC) area under curve (AUC) score was used as the primary evaluation metric. SHapley Additive exPlanations (SHAP) analysis was done to provide explainability of the trained models. Results: The XGBoost model showed the best results on retinopathy classification on the test set with a low amount of overfitting (AUC: 0.813, 95% CI: 0.808-0.819). 15 variables that had the highest impact on the prediction were obtained for explainability, which include eye-ear drugs, other eye diseases, Disorders of refraction, Insulin aspart and hemoglobin A1c (HbA1c). Conclusion: Early detection of retinopathy based on EHR data can be successfully detected in people with diabetes using machine learning. Our study reports that the XGBoost algorithm performed best in this research, with the presence of other eye diseases, insulin dependence and high HbA1c being observed as important predictors of retinopathy.