DOI: 10.4103/ijpvm.ijpvm_478_25 ISSN: 2008-7802

Designing an Optimal Diabetes Prediction Model Through a Machine Learning Approach

Masoud Amiri, Somayeh Hessam, Shaghayegh Vahdat, Shahram Tofighi

Abstract

Background:

Type 2 diabetes has been recognized as the most common metabolic disorder in the world. Preventive interventions using machine learning (ML) algorithms can play an effective role in predicting diabetes. The aim of the study is to design and compare the performance of algorithms in predicting type 2 diabetes.

Methods:

This cross-sectional study, with 10 variables, analyzes data from 5,063 people who are all above the age of 30 years old. The data were divided into three parts (70, 20, and 10 as training, validation, and testing, respectively). Six ML algorithms including artificial neural network (ANN), decision tree (DT), random forest (RF), K-nearest neighbor (KNN), logistic regression (LR), and XGBoost were used. The algorithms were adjusted by optimizing the parameters and the validation process. Various criteria, such as precision and accuracy, were used to evaluate the models. Finally, the best models were identified for the goal of predicting diabetes.

Results:

In terms of the accuracy index, the XGBoost, RF, KNN, DT, ANN, and LR algorithms had the highest accuracy in predicting diabetes, respectively. All models were able to predict diabetes with an accuracy of over 94%. In terms of the area under the curve receiver operating characteristic value, the XGBoost and RF algorithms had the highest performance in predicting diabetes (both with an accuracy of 98%). Furthermore, via the XGBoost model, it was shown that the fasting blood sugar, family history of diabetes, and systolic blood pressure variables were the most important factors affecting diabetes, respectively.

Conclusion:

The XGBoost algorithm had the highest accuracy percentage (99%), thus it was recognized as the strongest model performance in this study. Additionally, the variables fasting blood sugar, family history of diabetes, and systolic blood pressure were proven to have a more effective role in predicting type 2 diabetes than the other variables.

More from our Archive