Performance Comparison of Naive Bayes (NB) and KNN Algorithm for the Prediction Accuracy of Diabetes under HBA1c and FBS Test
Keywords:
Accuracy, Artificial Intelligence (AI), Diabetes Mellitus (DM), Fasting Blood Sugar (FBS), Glycated Hemoglobin (HBA1C), K-Nearest Neighbors (KNN), Machine Learning (ML), Naïve Bayes (NB)Abstract
The progressive disease known as Diabetes Mellitus (DM) is brought on by the body's inability to use the insulin it generates efficiently. One way to diagnose is by applying Artificial Intelligence (AI). Developing technological devices capable of logic, gaining knowledge, and behaving in capacities that would typically need human expertise or require data that is significantly above anything humans can evaluate is the focus of the scientific discipline of artificial intelligence. A branch of Artificial Intelligence (AI) called Machine Learning (ML) enables computers to gain knowledge from their experiences and improve over time without specific programming. Algorithms are used in machine learning to evaluate data, identify patterns, and generate results. Two significant machine learning algorithms, NB and KNN, are used in this research to predict the accuracy of diabetes. To diagnose Diabetes Mellitus (DM) precisely, this study uses a dataset from The Smt. Manjira Devi Group of Institutions and Ayurvedic Medical College and Hospital in Uttarakhand, to determine the best classification of the Naïve Bayes (NB) and K-Nearest Neighbors (KNN) methods. The research presented here states that two machine learning algorithms, NB and KNN, have been used to predict diabetes. The two algorithms have been modified to test the HBA1C and FBS datasets. After investigation, it was determined that the KNN algorithm outperforms the NB method in terms of prediction accuracy.
References
S Gowthami, Venkata Siva Reddy, and Mohammed Riyaz Ahmed, “Exploring the effectiveness of machine learning algorithms for early detection of Type-2 Diabetes Mellitus,” Measurement: Sensors, pp. 100983–100983, Dec. 2023, doi: https://doi.org/10.1016/j.measen.2023.100983.
A. F. Ashour, M. M. Fouda, Z. M. Fadlullah, and M. I. Ibrahem, “Enhancing Diabetes Prediction Based on Pair-Wise Ensemble Learning Model Selection,” 2024 International Conference on Smart Applications, Communications and Networking (SmartNets), pp. 1–6, May 2024, doi: https://doi.org/10.1109/smartnets61466.2024.10577723.
Md. A. Sahid, U. Hoque, and Md. P. Uddin, “Predictive modeling of multi-class diabetes mellitus using machine learning and filtering iraqi diabetes data dynamics,” PLoS ONE, vol. 19, no. 5, pp. e0300785–e0300785, May 2024, doi: https://doi.org/10.1371/journal.pone.0300785.
L. Al Rayes, M. Haggag, and I. Afyouni, “Predicting Pre-Diabetic and Diabetes in Adults and Elderlies Using Machine Learning,” 2022 Advances in Science and Engineering Technology International Conferences (ASET), pp. 1–8, Jun. 2024, doi: https://doi.org/10.1109/aset60340.2024.10708714.
N. J. Pathiranage and S. M. D. A. S. Suraweera, "DiabetCare – A Classifier based Mobile Application for Predicting the Risk of Prediabetes Mellitus, Gestational Diabetes Mellitus and Type 2 Diabetes Mellitus," 2024 International Research Conference on Smart Computing and Systems Engineering (SCSE), Colombo, Sri Lanka, 2024, pp. 1-6, doi: https://doi.org/10.1109/scse61872.2024.10550695.
A. A. Linkon et al., "Evaluation of Feature Transformation and Machine Learning Models on Early Detection of Diabetes Mellitus," in IEEE Access, vol. 12, pp. 165425-165440, 2024, doi: https://doi.org/10.1109/ACCESS.2024.3488743.
Salman, “Diabetes Multiclass Prediction Using Ensemble Learning Techniques,” Alkadhim journal for computer science., vol. 2, no. 4, pp. 10–22, Dec. 2024, doi: https://doi.org/10.61710/kjcs.v2i4.87.
S. Mahmud, B. U. Islam, Nazmul Haque Anik, and T. Ghosh, “Diabetes Prediction: A Comparative Analysis of Machine Learning Algorithms with SMOTE,” In 2024 IEEE International Conference on Computing, Applications, and Systems (COMPAS), pp. 1–6, Sep. 2024, doi: https://doi.org/10.1109/compas60761.2024.10796405.
S. A. B. Andrabi and I. Singh, "A Comparative Study of Machine Learning Techniques for Diabetes Prediction," 2022 4th International Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, 2022, pp. 741-745, doi: https://doi.org/10.1109/ICIRCA54612.2022.9985743.
H. O. Sayyid, S. A. Mahmood, and S. S. Hamadi, “A Comparative Analysis of Machine Learning Models for Predicting Thyroid Disorders in Type 1 and Type 2 Diabetic Patients,” Basrah Researches Sciences, vol. 50, no. 2, pp. 193–203, Dec. 2024, doi: https://doi.org/10.56714/bjrs.50.2.16.
Z. E. Huma, N. Tariq, and S. Zaidi, “Predictive Machine Learning Models for Early Diabetes Diagnosis: Enhancing Accuracy and Privacy with Federated Learning,” Journal of Computing & Biomedical Informatics, vol. 8, no. 01, 2023, Available: https://jcbi.org/index.php/Main/article/view/645
O. Virgolici and B. Virgolici, Diabetes Prediction using Machine Learning Techniques: A Brief Overview. Diabetes Complications, SCIVISION, vol. 8, no. 1, pp. 1-9. Available: https://www.scivisionpub.com/articles/diabetes-prediction-using-machine-learning-techniques-a-brief-overview-3189.html
M. S. Alam, M. J. Ferdous, and N. S. Neera, “Enhancing Diabetes Prediction: An Improved Boosting Algorithm for Diabetes Prediction,” International Journal of Advanced Computer Science and Applications, vol. 15, no. 5, Jan. 2024, doi: https://doi.org/10.14569/ijacsa.2024.01505129.
T. Althobaiti, S. Althobaiti, and M. M. Selim, “An optimized diabetes mellitus detection model for improved prediction of accuracy and clinical decision-making,” Alexandria Engineering Journal /Alexandria Engineering Journal, vol. 94, pp. 311–324, May 2024, doi: https://doi.org/10.1016/j.aej.2024.03.044.
J. Agarwal, H. Chauhan, S. Gupta, S. Mondal, Saumyadeep Mahanta, and S. K. Baliarsingh, “Unraveling Diabetes Detection: A Comparative Study of Machine Learning Approaches,” 2022 13th International Conference on Computing Communication and Networking Technologies (ICCCNT), pp. 1–6, Jun. 2024, doi: https://doi.org/10.1109/icccnt61001.2024.10724390.
N. A. Yatoo, I. S. Ali, and I. Mirza, “Comparing hyperparameter optimized support vector machine, multi-layer perceptron and bagging classifiers for diabetes mellitus prediction,” International Journal of Power Electronics and Drive Systems/International Journal of Electrical and Computer Engineering, vol. 14, no. 5, pp. 5834–5834, Aug. 2024, doi: https://doi.org/10.11591/ijece.v14i5.pp5834-5847.
Alsadi et al., “An ensemble-based machine learning model for predicting type 2 diabetes and its effect on bone health,” BMC Medical Informatics and Decision Making, vol. 24, no. 1, May 2024, doi: https://doi.org/10.1186/s12911-024-02540-0.
M. Halidu and A. S. Osman, “Developing an Ai-Based Predictive Model for Early Detection of Diabetes Complications,” Ashesi.edu.gh, Aug. 2024. https://air.ashesi.edu.gh/items/eca652ec-5c7e-4137-9321-d429ebdd3cf3 (accessed Jan. 27, 2025).
W. M. Eid, H. Alharthi, N. Aslam, I. U. Abdur rab, and A. Madani, “Predicting diabetic ketoacidosis in pediatric patients using machine learning,” F1000Research, vol. 12, p. 611, Jun. 2023, doi: https://doi.org/10.12688/f1000research.130042.1.
F. M. Okikiola, O. S. Adewale, and O. O. Obe, “A Diabetes Prediction Classifier Model Using Naive Bayes Algorithm,” Fudma Journal of Sciences, vol. 7, no. 1, pp. 253–260, Feb. 2023, doi: https://doi.org/10.33003/fjs-2023-0701-1301.
F. Navazi, Y. Yuan, and N. Archer, “An examination of the hybrid meta-heuristic machine learning algorithms for early diagnosis of type II diabetes using big data feature selection,” Healthcare Analytics, vol. 4, p. 100227, Dec. 2023, doi: https://doi.org/10.1016/j.health.2023.100227.
M. S. Alzboon, M. S. Al-Batah, M. Alqaraleh, A. Abuashour, and A. F. Hamadah Bader, “Early Diagnosis of Diabetes: A Comparison of Machine Learning Methods: International Journal of Online & Biomedical Engineering,” International Journal of Online & Biomedical Engineering, vol. 19, no. 15, pp. 144–165, Dec. 2023, doi: https://doi.org/10.3991/ijoe.v19i15.42417.
K. Al Sadi and W. Balachandran, “Prediction Model of Type 2 Diabetes Mellitus for Oman Prediabetes Patients Using Artificial Neural Network and Six Machine Learning Classifiers,” Applied Sciences, vol. 13, no. 4, p. 2344, Feb. 2023, doi: https://doi.org/10.3390/app13042344.
O. Iparraguirre-Villanueva, K. Espinola-Linares, O. Flores, and M. Cabanillas-Carbonell, “Application of Machine Learning Models for Early Detection and Accurate Classification of Type 2 Diabetes,” Diagnostics, vol. 13, no. 14, pp. 2383–2383, Jul. 2023, doi: https://doi.org/10.3390/diagnostics13142383.
N. Haviluddin, N. Puspitasari, A. E. Burhandeny, A. D. A. Nurulita, and D. Trahutomo, “Naïve Bayes and K-Nearest Neighbor Algorithms Performance Comparison in Diabetes Mellitus Early Diagnosis,” International Journal of Online and Biomedical Engineering, vol. 18, no. 15, pp. 202–215, Dec. 2022, doi: https://doi.org/10.3991/ijoe.v18i15.34143.