This is a preview and has not been published.

A Comparative Analysis of Machine Learning Algorithms for Classification of Diabetes Utilizing Confusion Matrix Analysis




Algorithms, Classification, Confusion Matrix, Diabetes, Machine Learning


Healthcare experts have been employing machine learning more and more in recent years to enhance patient outcomes and reduce costs. In addition, machine learning has been applied in various areas, including disease diagnosis, patient risk classification, customized treatment suggestions, and drug development. Machine learning algorithms can scrutinize vast quantities of data from electronic health records, medical images, and other sources to identify patterns and make predictions, which can support healthcare professionals and experts in making better-informed decisions, enhancing patient care, and determining a patient's health status. In this regard, the author opted to compare the performance of three algorithms (logistic regression, Adaboost, and naïve bayes) through the correct classification rate for diabetes prediction in order to ensure the effectiveness of accurate diagnosis. The dataset applied in this work is obtained from the Vanderbilt university institutional repository and is publicly available data. The study determined that three algorithms are very effective at prediction. Mainly, logistic regression and Adaboost had a classification rate above 92%, and the naive bayes algorithm achieved a classification rate above 90%.


Download data is not yet available.


Ali A, Al-Awkally N M, Ahmer A, Tariq S, Mumtaz T, Shahbaz H, et al. Diabetes Mellitus and Renal Failure Effect on Intestinal Insulin. Brilliance: Res Artif Intell. 2022; 2(3): 102-106.

Sunday H G, Sadia A H, Ojo O G. Mechanisms of Diabetes Mellitus Progression: A Review. J Diab Neph Diab Mang. 2022; 1(1):1-5.

Mahesh T R, Kumar D, Kumar V V, Asghar J, Bazezew B M, Natarajan R, Vivek V. Blended Ensemble Learning Prediction Model for Strengthening Diagnosis and Treatment of Chronic Diabetes Disease. Comput Intell Neurosci. 2022; 2022(4451792): 1-9.

Laurent S, Agabiti-Rosei C, Bruno R M, Rizzoni D. Microcirculation and Macrocirculation in Hypertension: A Dangerous Cross-Link?. Hypertension. 2022; 79(3): 479–490.

Yang K, Wang Y, Li Y, Chen Y, Xing N, Lin H, et al. Progress in the treatment of diabetic peripheral neuropathy. Biomed. Pharmacother. 2022; 148: 1-10.

Chao A M, Wadden T A, Clark J M, Hayden K M, Howard M J, Johnson K C, et al. Changes in the Prevalence of Symptoms of Depression, Loneliness, and Insomnia in U.S. Older Adults With Type 2 Diabetes During the COVID-19 Pandemic: The Look AHEAD Study. Diabetes Care. 2022; 45(1): 74–82.

Harbuwono D S, Handayani D O T L, Wahyuningsih E S, Supraptowati N, Ananda, Kurniawan F, et al. Impact of diabetes mellitus on COVID-19 clinical symptoms and mortality: Jakarta’s COVID-19 epidemiological registry. Diabetes Prim Care. 2022; 16(1): 65-68.

Iacopi E, Pieruzzi L, Riitano N, Abbruzzese L, Goretti C, Piaggesi A. The Weakness of the Strong Sex: Differences Between Men and Women Affected by Diabetic Foot Disease. Int J Low Extrem Wounds. 2021; 22(1): 19-26.

Gollapalli M, Alansari A, Alkhorasani H, Alsubaii M, Sakloua R, Alzahrani R, et al. novel stacking ensemble for detecting three types of diabetes mellitus using a Saudi Arabian dataset: Pre-diabetes, T1DM, and T2DM. Comput Biol Med. 2022; 147: 1-12.

Giha H A, Sater M S, Alamin O A O. Diabetes mellitus tendino-myopathy: epidemiology, clinical features, diagnosis and management of an overlooked diabetic complication. Acta Diabetol. 2022; 59:871–883.

Marques M, López-Sánchez P, Tornero F, Gargantilla P, Maroto A, Ortiz A, Portolés J. The hidden diabetic kidney disease in a university hospital-based population: a real-world data analysis. Clin Kidney J. 2022; 15(10):1865–1871.

Yunka T T, Mogas S B, Zawdie B, Tamiru D, Tesfay Y. The Hidden Burden of Diabetes Mellitus in an Urban Community of Southwest Ethiopia. Diabetes Metab Syndr Obes: Targets Ther. 2020; 13: 2925–2933.

Diabetes reports. IDF Diabetes Atlas, 2021. [Cited 2023 Feb 15]. Available from:

Sharma M, Nazareth I, Petersen I. Trends in incidence, prevalence and prescribing in type 2 diabetes mellitus between 2000 and 2013 in primary care: a retrospective cohort study. BMJ Open. 2016; 6: 1-11.

Census 2021. Office for National Statistics. Available from:

City and Hackney Public Health Team Joint Strategic Needs Assessment: Adult Health and Diabetes, 2021. [Cited 2023 Feb 15].

Marples O, Resca L, Plavska J, Hassan S, Mistry V, Mallik R, Brown A. Real-World Data of a Group-Based Formula Low Energy Diet Programme in Achieving Type 2 Diabetes Remission and Weight Loss in an Ethnically Diverse Population in the UK: A Service Evaluation. Nutrients. 2022; 14(15): 1-15.

Brown A, McArdle P, Taplin J, Unwin D, Unwin J, Deakin T, et al. Dietary strategies for remission of type 2 diabetes: A narrative review. J Hum Nutr Diet. 2022; 35(1): 165-178.

Rebelos E, Moriconi D, Honka M, Anselmino M, Nannipieri M. Decreased Weight Loss Following Bariatric Surgery in Patients with Type 2 Diabetes. Obes Surg. 2022; 33: 179–187.

Johnson L A. FDA approves first blood sugar monitor without finger pricks, 2017. [Cited 2023 Feb 15]:

Mijwil M M, Aljanabi M, ChatGPT. Towards Artificial Intelligence-Based Cybersecurity: The Practices and ChatGPT Generated Ways to Combat Cybercrime. Iraqi J Comput Sci Math. 2023; 4(1): 65-70.

Ismael A M, Şengür A. Deep learning approaches for COVID-19 detection based on chest X-ray images. Expert Syst Appl. 2021; 164:114054.

Mijwil M M. Deep Convolutional Neural Network Architecture to Detection COVID-19 from Chest X-ray Images. Iraqi J Sci. 2023; 64(5):2561-2574.

Nassif A B, Mahdi O, Nasir Q, Talib M A, and Azzeh M. Machine learning classifications of coronary artery disease. Int Joint Symp Artif Intell Nat Lang Process. 2018:1–6.

Ashraf S, Alfandi O, Ahmad A, Khattak A M, Hayat B, Kim K H, Ullah A. Bodacious-Instance Coverage Mechanism for Wireless Sensor Network. Wirel Commun Mob Comput. 2020; 2020(8833767): 1-11.

Ahmad A, Ullah A, Feng C, Khan M, Ashraf S, Adnan M, Nazir S, Khan H U. Towards an Improved Energy Efficient and End-to-End Secure Protocol for IoT Healthcare Applications. Secur Commun Netw. 2020; 2020(8867792): 1-10.

Shukur B S, Mijwil M M. Involving Machine learning as Resolutions of Heart Diseases. Int J Electr Comput Eng. 2023; 13(2): 2177-2185.

Kumar S, Bhushan B, Singh D, Choubey D K. Classification of Diabetes using Deep Learning. Int Confer Commun Signal Process. 2020: 1-6, Chennai, India.

Mujumdar A, Vaidehi V. Diabetes Prediction using Machine Learning Algorithms. Procedia Comput Sci. 2019; 165: 292-299.

Olisah C C, Smith L, Smith M. Diabetes mellitus prediction and diagnosis from a data preprocessing and machine learning perspective. Comput Methods Programs Biomed. 2022; 220: 1-12.

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

Zou Q, Qu K, Luo Y, Yin D, Ju Y, Tang H. Predicting Diabetes Mellitus with Machine Learning Techniques. Front Genet. 2018; 9(515): 1-10.

Math L, Fatima R. Adaptive machine learning classification for diabetic retinopathy. Multimed Tools Appl. 2020; 80: 5173–5186.

Diabetic dataset. Vanderbilt biostatistics datasets site, 2023. [Cited 2023 Feb 15].

Wu J, Zhou Y, Hu H, Yang D, Yang F. Effects of β-carotene on glucose metabolism dysfunction in humans and type 2 diabetic rats. Acta Mater Med. 2022; 1(1): 138-153.

Hodkinson A, Tsimpida D, Kontopantelis E, Rutter M K, Mamas M A, Panagioti M. Comparative effectiveness of statins on non-high density lipoprotein cholesterol in people with diabetes and at risk of cardiovascular disease: systematic review and network meta-analysis. BMJ. 2022; 376(e067731): 1-13.

Lee C S, Baughman D M, Lee A Y. Deep Learning Is Effective for Classifying Normal versus Age-Related Macular Degeneration OCT Images. Ophthalmol. Retina. 2017; 1(4): 322-327.

Sidey-Gibbons J A M, Sidey-Gibbons C J. Machine learning in medicine: a practical introduction. BMC Med Res Methodol. 2019; 19(64):1-18.

Khanday A M U D, Khan Q R, Rabani S T. Detecting Textual Propaganda Using Machine Learning Techniques. Baghdad Sci J. 2021; 18(1),:199-209.

Abdulmajeed A A, Tawfeeq T M, Al-jawaherry M A. Constructing a Software Tool for Detecting Face Mask-wearing by Machine Learning. Baghdad Sci J, 2022; 19(3):642-653.

Maniruzzaman, Rahman J, Al-MehediHasan Suri H S, Abedin M, El-Baz A, Suri J S. Accurate Diabetes Risk Stratification Using Machine Learning: Role of Missing Value and Outliers. J Med Syst. 2018; 42(92): 1-17.

Alam T M, Iqbal M A, Ali Y, Wahab A, Ijaz S, Baig T I, Hussain A, Malik M A, Raza M M, Ibrar S, Abbas Z. A model for early prediction of diabetes. Inform Med Unlocked. 2019; 16: 1-6.

Sivaranjani S, Ananya S, Aravinth J, Karthika R. Diabetes Prediction using Machine Learning Algorithms with Feature Selection and Dimensionality Reduction. Int Conf Adv Comput Commun Syst. 2021: 1-6, Coimbatore, India.

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

Nadeem M W, Goh H G, Ponnusamy V, Andonovic I, Khan M A, Hussain M. A Fusion-Based Machine Learning Approach for the Prediction of the Onset of Diabetes. Healthcare. 2021; 9(10): 1-16.

Laila U E, Mahboob K, Khan A W, Khan F, Taekeun W. An Ensemble Approach to Predict Early-Stage Diabetes Risk Using Machine Learning: An Empirical Study. Sensors. 2022; 22(14): 1-15.

Kaur H, Kumari V. Predictive modelling and analytics for diabetes using a machine learning approach. Appl Comput Inform. 2022; 18(1/2): 90-100.