Performance Comparison of XGBoost and Naïve Bayes Algorithms Using SMOTE-Tomek for Diabetes Disease Classification
DOI:
https://doi.org/10.57152/malcom.v6i4.2855Keywords:
Diabetes Classification, Imbalanced Dataset, Naïve Bayes, SMOTE-Tomek Link, XGBoostAbstract
Diabetes mellitus remains a major global public health issue, including in Indonesia, where the rising number of cases requires accurate and timely prediction. Classification models often face challenges due to imbalanced datasets, which reduce their ability to detect minority classes. This study aims to compare the performance of the XGBoost and Naïve Bayes algorithms and to evaluate the effectiveness of the SMOTE-Tomek technique in handling class imbalance for diabetes classification. The dataset used is the Kaggle Diabetes Prediction Dataset, consisting of approximately 100,000 records with demographic and clinical attributes. The preprocessing stage includes label encoding, Min-Max normalization, and data balancing using SMOTE-Tomek. The dataset is then split into training and testing sets in an 80:20 ratio, and model performance is evaluated using accuracy, precision, recall, and F1 Score. The results show that XGBoost outperforms Naïve Bayes, achieving 97% accuracy, 88% precision, 72% recall, and 79% F1-score. Furthermore, the application of SMOTE-Tomek improves detection of the minority class, particularly recall, while slightly decreasing precision and F1-score. The combination of XGBoost and SMOTE-Tomek proves more effective at handling imbalanced data for early diabetes detection.
Downloads
References
“Hubungan Riwayat Keluarga Diabetes Melitus Dan Riwayat Hipertensi Dengan Kejadian Diabetes Melitus Di Wilayah Kerja Puskesmas Palaran Samarinda Tahun 2019,” Vol. 1, No. 3, Pp. 1948–1953, 2020.
R. P. Fadhillah, R. Rahma, A. Sepharni, R. Mufidah, B. N. Sari, And A. Pangestu, “Klasifikasi Penyakit Diabetes Mellitus Berdasarkan Faktor-Faktor Penyebab Diabetes Menggunakan Algoritma C4.5,” Vol. 07, Pp. 1265–1270, 2022.
A. Aminuddin, Y. Sima, N. C. Izza, N. S. Norma, And D. Arda, “Abdimas Polsaka?: Jurnal Pengabdian Kepada Masyarakat Edukasi Kesehatan Tentang Penyakit Diabetes Melitus Bagi Masyarakat,” Pp. 7–12, 2023.
A. R. Hidayat, A. Nurjanah, R. Farizki, D. Melitus, D. Melitus, And K. Kesehatan, “Upaya Untuk Mencegah Penyakit Diabetes Pada Usia Dini,” 2021.
E. To Et Al., “Pada Penderita Diabetes Melitus,” Vol. 4, 2024.
A. A. Nababan, M. Jannah, M. Aulina, And D. Andrian, “Prediksi Kualitas Udara Menggunakan Xgboost Dengan Synthetic Minority Oversampling Technique ( Smote ) Berdasarkan Indeks Standar Pencemaran Udara ( Ispu ),” Vol. 7, No. 1, Pp. 214–219, 2023.
W. R. Perdana, R. Afriantoni, S. Agustini, D. Saro, And Y. Aprizal, “Prediksi Kelulusan Mahasiswa Menggunakan Algoritma Naive Bayes?: Studi Kasus Universitas Ibnu Sina Batam,” Vol. 8, No. 02, Pp. 88–92, 2024, Doi: 10.36352/Jr.V3i.
E. F. Swana And W. Doorsamy, “Tomek Link And Smote Approaches For Machine Fault Classification With An Imbalanced Dataset,” 2022.
L. Ai-Jun, “Research On Unbalanced Data Processing Algorithm Base,” Pp. 13–17, 2020.
L. Artikel, I. Komputer, K. T. Dan, S. Untuk, M. Ketidakseimbangan, And K. Pada, “Jurnal Larik,” Vol. 2, No. 2, Pp. 32–40, 2022.
A. Ridwan, “Penerapan Algoritma Naïve Bayes Untuk Klasifikasi Penyakit Diabetes Mellitus,” Vol. Iv, No. September, Pp. 15–21, 2020.
F. R. Kusumajati, B. Rahmat, A. Junaidi, T. Jalan, R. Rungkut, And J. Timur, “Implementation Of Balancing Data Method Using Smotetomek In Diabetes Classification Using,” Vol. 12, No. 4, Pp. 201–212, 2024.
H. P. Barus And F. A. Tarigan, “Comparison Of Xgboost And Naive Bayes Models In Type 2 Diabetes Prediction With Rfe Feature Selection,” Vol. 10, No. 1, Pp. 352–360, 2026.
D. Indra, J. Endro, And W. Amien, “Sentiment Analysis Of Customer Reviews Using Support Vector Machine And Smote-Tomek Links For Identify Customer Satisfaction,” Vol. 01, Pp. 1–9, 2023, Doi: 10.21456/Vol13iss1pp1-9.
N. Made, O. Septhi, A. Wahyudi, And O. Gama, “Analisis Performa Xgboost Dan Gaussian Naive Bayes Untuk Klasifikasi Dini Penyakit Hipertensi Prediksi Penyakit . Dalam Studi Terbaru Terkait Prediksi Penyakit Kardiovaskular , ( Rayadhani &,” Vol. 6, 2026.
L. P. S, F. S. S. Nagalay, And U. Ubaidillah, “Analisis Perbandingan Algoritma Decision Tree , K-Nn , Naive Bayes , Dan Xgboost Memprediksi Penyakit Diabetes Menggunakan Data Behavioral Risk Factor Surveillance System,” Pp. 25–29, 2015.
N. Purnamasari And N. Hendrastuty, “Perbandingan Kinerja Xgboost Dan Naive Bayes Dalam Analisis Sentimen Komentar Tiktok Terhadap Ibu Kota Nusantara ( Ikn ) Pada Data Tidak Seimbang,” Vol. 7, No. 4, Pp. 2690–2703, 2026, Doi: 10.47065/Bits.V7i4.9488.
D. R. Ignatius, M. Setiadi, K. Nugroho, A. R. Muslikh, S. Wahyu, And A. A. Ojugo, “Journal Of Future Artificial Intelligence Integrating Smote-Tomek And Fusion Learning With Xgboost Meta-Learner For Robust Diabetes Recognition,” 2024.
P. K. Kredit, “Stacking Ensemble Dengan Smote Untuk Efisiensi Energi Deteksi Penipuan Kartu Kredit 1,2,” Vol. 8, Pp. 468–475, 2025, Doi: 10.37600/Tekinkom.V8i1.2409.
D. Susilawati And D. Riana, “Optimization The Naive Bayes Classifier Method To Diagnose Diabetes Mellitus,” Vol. 1, No. 1, Pp. 78–86, 2019.
S. Komparasi, A. Id, D. A. N. Algoritma, N. Nurdiana, And A. Algifari, “Naive Bayes Untuk Klasifikasi Penyakit,” Pp. 18–23, 2015.
K. Kunci, “Indonesian Journal Of Computer Science,” Vol. 12, No. 1, Pp. 2757–2764, 2023.
R. Illaihiyah And G. Abdurrahman, “Implementation Of The Xgboost Classifier Algorithm For Classifying Crowds Of Hajj And Umrah Pilgrims Implementasi Algoritma Xgboost Classifier Untuk Klasifikasi Kerumunan Jemaah Haji Dan Umrah,” Vol. 6, No. January, Pp. 106–115, 2026.
F. I. Komputer, U. Dian, And N. Semarang, “305 | Fakultas Teknik Universitas Wahid Hasyim,” Pp. 305–313, 2015.
P. S. Rizky Et Al., “Perbandingan Metode Lightgbm Dan Xgboost Dalam Menangani Data Dengan Kelas Tidak Seimbang Universitas Hamzanwadi Selong,” Vol. 15, No. 2, Pp. 228–236, 2022.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Ayu Annisa Putri, Muh Fuad Mansyur, Wawan Firgiawan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Copyright © by Author; Published by Institut Riset dan Publikasi Indonesia (IRPI)
This Indonesian Journal of Machine Learning and Computer Science is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.










