Computer Journal
Vol. 5 No. 1 (2027): February

Evaluating the Performance of Naïve Bayes and Support Vector Machine Classifiers for Diabetes Classification Using Cross-Validation

Zainudin Zainudin (Universitas Pamulang)
Andri Fahmi (Universitas Pamulang)



Article Info

Publish Date
01 Feb 2027

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.

Copyrights © 2027






Journal Info

Abbrev

cj

Publisher

Subject

Computer Science & IT Control & Systems Engineering Decision Sciences, Operations Research & Management

Description

Computer Journal, e-ISSN: 2964-6219 and p-ISSN: 2964-6200 is a free and open-access journal published by the Research Division, YPMMA Institute, Indonesia. Computer Journal is an international, scientific, peer-reviewed, open-access computer science journal, including computer and network ...