Articles Vol. 5, No. 1 (2027)
Zainudin Zainudin, Andri Fahmi
Universitas Pamulang ROR
10.58477/cj.v5i1.595 Published: 2027-02-01
Abstract

This study aims to compare the performance of the Naïve Bayes and Support Vector Machine algorithms in diabetes classification using the Pima Indians Diabetes Database. The dataset consists of 768 observations with eight predictor attributes and one target attribute, namely Outcome. The research methodology includes data understanding, preprocessing, model training, and evaluation using Stratified 10-Fold Cross-Validation. Preprocessing encompasses handling zero values on certain attributes, median imputation, and feature standardization for SVM. Evaluation was carried out using accuracy, precision, recall, F1-score, ROC-AUC, and a confusion matrix. The test results showed that SVM obtained an average accuracy of 0.7474, precision of 0.6805, recall of 0.5373, F1-score of 0.5969, and ROC-AUC of 0.8256. Meanwhile, Naïve Bayes obtained an average accuracy of 0.7460, precision of 0.6610, recall of 0.6010, F1-score of 0.6222, and ROC-AUC of 0.8128. Based on the confusion matrix, Naïve Bayes correctly classified 161 of the 268 diabetes samples, whereas SVM correctly classified 144 samples. The results indicate that SVM achieved slightly higher accuracy and ROC-AUC, whereas Naïve Bayes provided better recall and F1-score values, demonstrating a superior capability in recognizing diabetes samples in this test. Consequently, algorithm selection must consider classification objectives and evaluation metrics, particularly when detecting the diabetes class is a priority.

How to Cite

How to Cite

Zainudin, Z., & Fahmi, A. (2027). Evaluating the Performance of Naïve Bayes and Support Vector Machine Classifiers for Diabetes Classification Using Cross-Validation. Computer Journal, 5(1), 123-131. https://doi.org/10.58477/cj.v5i1.595
Zainudin Zainudin

Universitas Pamulang

Department of Informatics Engineering, Universitas Pamulang, South Tangerang City, Banten Province, Indonesia.

Andri Fahmi

Universitas Pamulang

Department of Informatics Engineering, Universitas Pamulang, South Tangerang City, Banten Province, Indonesia.

Issue Vol. 5 No. 1 (2027)
SectionArticles
DOI10.58477/cj.v5i1.595
Publication Date2027-02-01
Pages123-131
  • Ahmed, A., Khan, J., Arsalan, M., Ahmed, K., Shahat, A. A., Alhalmi, A., & Naaz, S. (2025). Machine learning algorithm-based prediction of diabetes among female population using PIMA dataset. Healthcare, 13(1), Article 37. https://doi.org/10.3390/healthcare13010037
  • Butt, U. M., Letchmunan, S., Ali, M., Hassan, F. H., Baqir, A., & Sherazi, H. H. R. (2021). Machine learning based diabetes classification and prediction for healthcare applications. Journal of Healthcare Engineering, 2021, Article 9930985. https://doi.org/10.1155/2021/9930985
  • Chang, V., Bailey, J., Xu, Q. A., & Sun, Z. (2023). Pima Indians diabetes mellitus classification based on machine learning (ML) algorithms. Neural Computing and Applications, 35(22), 16157–16173. https://doi.org/10.1007/s00521-022-07049-z
  • Gupta, S. C., & Goel, N. (2023). Predictive modeling and analytics for diabetes using hyperparameter tuned machine learning techniques. Procedia Computer Science, 218, 1257–1269. https://doi.org/10.1016/j.procs.2023.01.104
  • Jannah, M. D., Fauzi, A., Emilia, C., & Hikmayanti, H. (2025). Klasifikasi penyakit hipertensi menggunakan Support Vector Machine dan Naïve Bayes. Jurnal Algoritma, 22(1). https://doi.org/10.33364/algoritma/v.22-1.2316
  • Karo Karo, I. M., & Hendriyana, H. (2022). Klasifikasi penderita diabetes menggunakan algoritma machine learning dan Z-Score. Jurnal Teknologi Terpadu, 8(2), 105–112. https://doi.org/10.54914/jtt.v8i2.564
  • Katiyar, N., Thakur, H. K., & Ghatak, A. (2024). Recent advancements using machine learning & deep learning approaches for diabetes detection: A systematic review. E-Prime - Advances in Electrical Engineering, Electronics and Energy, 9, Article 100661. https://doi.org/10.1016/j.prime.2024.100661
  • Khokhar, P. B., Gravino, C., & Palomba, F. (2025). Advances in artificial intelligence for diabetes prediction: Insights from a systematic literature review. Artificial Intelligence in Medicine, 164, Article 103132. https://doi.org/10.1016/j.artmed.2025.103132
  • Kibria, H. B., Nahiduzzaman, M., Goni, M. O. F., Ahsan, M., & Haider, J. (2022). An ensemble approach for the prediction of diabetes mellitus using a soft voting classifier with an explainable AI. Sensors, 22(19), Article 7268. https://doi.org/10.3390/s22197268
  • Merdin Shamal Salih. (2024). Diabetic prediction based on machine learning using PIMA Indian dataset. Communications on Applied Nonlinear Analysis, 31(5s), 138–156. https://doi.org/10.52783/cana.v31.1008
  • Olisah, C. C., Smith, L., & Smith, M. (2022). Diabetes mellitus prediction and diagnosis from a data preprocessing and machine learning perspective. Computer Methods and Programs in Biomedicine, 220, Article 106773. https://doi.org/10.1016/j.cmpb.2022.106773
  • Olusanya, M. O., Ogunsakin, R. E., Ghai, M., & Adeleke, M. A. (2022). Accuracy of machine learning classification models for the prediction of type 2 diabetes mellitus: A systematic survey and meta-analysis approach. International Journal of Environmental Research and Public Health, 19(21), Article 14280. https://doi.org/10.3390/ijerph192114280
  • Prusty, S., Patnaik, S., & Dash, S. K. (2022). SKCV: Stratified K-fold cross-validation on ML classifiers for predicting cervical cancer. Frontiers in Nanotechnology, 4, Article 972421. https://doi.org/10.3389/fnano.2022.972421
  • Rosenblatt, M., Tejavibulya, L., Jiang, R., Noble, S., & Scheinost, D. (2024). Data leakage inflates prediction performance in connectome-based machine learning models. Nature Communications, 15(1), Article 1928. https://doi.org/10.1038/s41467-024-46150-w
  • Shams, M. Y., Tarek, Z., & Elshewey, A. M. (2025). A novel RFE-GRU model for diabetes classification using PIMA Indian dataset. Scientific Reports, 15(1), Article 1120. https://doi.org/10.1038/s41598-024-82420-9
  • Szeghalmy, S., & Fazekas, A. (2023). A comparative study of the use of stratified cross-validation and distribution-balanced stratified cross-validation in imbalanced learning. Sensors, 23(4), Article 2333. https://doi.org/10.3390/s23042333
  • Tong, H. L., Ng, H., & Arul Ananthan, H. (2024). Predicting diabetes mellitus with machine learning techniques. Journal of Engineering Technology and Applied Physics, 6(1), 91–99. https://doi.org/10.33093/jetap.2024.6.1.12
License

This work is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Article Statistics
Download data is not yet available.
Similar Articles
Dwi Saidina Zulfela Sembiring, Ardiansyah Putra, Alex Zander Siregar, Alfito Surya Pradana, Rico Wijaya Dewantoro  ·  Computer Journal: Vol. 4 No. 2 (2026): August