Diabetes Prediction by KNN, SVM, Random Forest and XGBoost

Authors

  • Shuqi Liu

DOI:

https://doi.org/10.54097/8h8dff76

Keywords:

Diabetes; machine learning; KNN; XGBoost.

Abstract

Diabetes is a chronic condition that is incurable, and it may even cause some serious complications, so early prevention is crucial. In order to benefit relevant researchers, this paper collects the Pima Indians dataset from the kaggle website. The dataset contains data of 768 patients, in the first eight columns of the dataset are the data of their body indicators and the last column represents the result of whether they have diabetes or not. In this paper, four ML algorithms KNN, SVM, RF and XGB are used to predict diabetes, and hyperparameter optimization is done using Gridsearch, Cross validation to get the best result of each model. After optimizing these four models and training them on the training set, the following results were obtained on the test set: the KNN algorithm got the highest precision score and accuracy score, while the XGBoost algorithm got the highest recall score and f1 score, and the remaining two algorithms got slightly lower results.

Downloads

Download data is not yet available.

References

World Health Organization. Diabetes, 2023.

Institute for Health Metrics and Evaluation. Global Burden of Disease Study 2019: Results. Seattle, WA: IHME, 2020.

Olisah, C., Smith, L., & Smith, M. Diabetes mellitus prediction and diagnosis from a data pre-processing and machine learning perspective. Computer Methods, 2022.

Hasan, M. K., Alam, M. A., Das, D., Hossain, E., & Hasan, M. Diabetes Prediction Using Ensembling of Different Machine Learning Classifiers. IEEE Access, 2020, 8: 76516-76531.

UCI Machine learning. PIMA Indians Diabetes Dataset. Retrieved from https://kaggle.com

Khanam, J. J., & Foo, S. Y. A comparison of machine learning algorithms for diabetes prediction. ICT Express, 2021, 7(4): 432-439.

K. V. K. G., Shanmugasundaram, H., E, A., M, R., C, N., & SJ, B. Analysis of Pima Indian Diabetes Using KNN Classifier and Support Vector Machine Technique. In 2022 Third International Conference on Intelligent Computing Instrumentation and Control Technologies, 2022: 1376-1380.

Bi, Y., Wang, P., Pan, Y., et al. Comparison of risk prediction models for type 2 diabetes. Computer Knowledge and Technology, 2020, 16(28): 8-10+17.

Zou, Q., Qu, K., Luo, Y., Yin, D., Ju, Y., & Tang, H. Predicting diabetes mellitus with machine learning techniques. Frontiers in Genetics, 20187, 9: 515.

Fan, B. Research on diabetes risk prediction model based on convolutional neural network. Thesis for doctoral dissertation, Nanjing University of Posts and Telecommunications, 2023.

Luan, X. Research on diabetes prediction based on clustering undersampling hybrid integration algorithm. Thesis for doctoral dissertation, Jilin University, 2023.

FU, H., DING, X., CHEN, D., et al. Establishment of a predictive model for hypotension in haemodialysis patients with diabetic nephropathy based on the random forest algorithm. Chinese Journal of Integrative Nephrology, 2023, 24(06): 493-496.

Fan, J. Research on multiple algorithms for prediction of early diabetes. Thesis for doctoral dissertation, Chongqing University, 2022.

Liu, Q., Ma, Y., & Cai, Y. Diabetes classification prediction model and application based on XGBoost algorithm. Modern Instrumentation and Medical Treatment, 2023, 29(04): 1-6+11.

Downloads

Published

15-12-2023

How to Cite

Liu, S. (2023). Diabetes Prediction by KNN, SVM, Random Forest and XGBoost. Highlights in Science, Engineering and Technology, 72, 1113-1120. https://doi.org/10.54097/8h8dff76