Perbandingan Metode Naïve Bayes dan Random Forest dalam Memprediksi Penyakit Diabetes Melitus pada Klinik Citra Sejati
DOI:
https://doi.org/10.35746/jtim.v7i4.747Kata Kunci:
Prediction, Diabetes Mellitus, Naïve Bayes, Random ForestAbstrak
Diabetes mellitus is a chronic disease with a steadily increasing prevalence in Indonesia and is one of the leading causes of death, particularly in urban areas. Early detection of this disease is crucial to prevent serious complications such as heart disease, kidney failure, and vision impairment. In the era of digital transformation, machine learning techniques offer great potential to support early and automated diagnosis with higher accuracy. This study aims to develop a diabetes prediction system based on medical record data using two machine learning algorithms: Naïve Bayes and Random Forest. The dataset was obtained from Klinik Citra Sejati, consisting of 266 patient records with seven clinical features: age, gender, leukocytes, platelets, hematocrit, erythrocytes, and erythrocyte sedimentation rate (ESR). The models were implemented using Python programming language and the Scikit-learn library. Performance evaluation was carried out using the confusion matrix and classification metrics such as accuracy, precision, recall, and F1-score. Furthermore, ROC curve analysis and 95% confidence interval calculation were used to assess the stability and reliability of the predictions. The results showed that the Random Forest algorithm achieved an average accuracy of 89.97% with an AUC of 0.93, while Naïve Bayes achieved an accuracy of 85.97% with an AUC of 0.72. Based on these results, Random Forest is considered more effective for diabetes classification and is recommended as the primary algorithm for the development of clinical decision support systems based on local medical data.
Unduhan
Referensi
Lestari, Zulkarnain, and A. S. ST, “Diabetes Melitus: Review Etiologi, Patofisiologi, Gejala, Penyebab, Cara Pemeriksaan, Cara Pengobatan dan Cara Pencegahan,” Prosiding Biologi Achieving the Sustainable Development Goals, vol. 7, no. 1, pp. 237–241, Nov. 2021, https://doi.org/10.24252/psb.v7i1.24229.
D. C. Putri Buani, “Deteksi Dini Penyakit Diabetes dengan Menggunakan Algoritma Random Forest,” Jurnal Sains dan Manajemen, vol. 12, no. 1, pp. 1–8, 2024, https://doi.org/10.31294/evolusi.v12i1.21005.
B. Hartono and S. Ediyono, “Hubungan Tingkat Pendidikan, Lama Menderita Sakit Dengan Tingkat Pengetahuan 5 Pilar Penatalaksanaan Diabetes Mellitus Di Wilayah Kerja Puskesmas Sungai Durian Kabupaten Kbu Raya Kalimantan Barat,” Journal of TSCS1Kep, vol. 9, no. 1, pp. 49–58, 2024, https://doi.org/10.35720/tscs1kep.v9i01.
M. Ardiansyah, “Model Ensemble Algoritma Naive Bayes Dan Random Forest Dalam Klasifikasi Penyakit Paru-paru Untuk Meningkatkan Akurasi,” SMARTLOCK: Jurnal Sains dan Teknologi, vol. 2, no. 2, pp. 32–38, 2023, https://doi.org/10.37476/smartlock.v2i2.4407.
M. Kholish, A. Herdianto, R. F. Setiawan, and R. Samsinar, “Perbandingan Algoritma Random Forest dan Naive Bayes dalam Memprediksi Penyakit Diabetes,” HUBISINTEK, vol. 5, no. 1, pp. 322–328, 2024, Accessed: Jun. 09, 2025. https://ojs.udb.ac.id/index.php/HUBISINTEK/article/view/4757
D. Nurul Anisa and jumanto, “Klasifikasi Penyakit Diabetes Menggunakan Algoritma Naive Bayes,” Dinamika Informatika, vol. 14, no. 1, pp. 33–42, 2022, https://doi.org/10.35315/informatika.v14i1.9135.
M. Rafli Zuhri and D. Ariatmanto, “Analisis Perbandingan Algoritma Klasifikasi Untuk Identifikasi Diabetes Dengan Menggunakan Metode Random Forest Dan Naïve Bayes,” Jurnal Informatika Teknologi dan Sains, vol. 7, no. 1, pp. 11–20, Feb. 2025, https://doi.org/10.51401/jinteks.v7i1.5146.
S. Borrohou, R. Fissoune, and H. Badir, “Data cleaning survey and challenges – improving outlier detection algorithm in machine learning,” Journal of Smart Cities and Society, vol. 2, no. 3, pp. 125–140, Oct. 2023, https://doi.org/10.3233/scs-230008.
M. Riko Anshori Prasetya and A. Mudi Priyatno, “Penanganan Imputasi Missing Values pada Data Time Series dengan Menggunakan Metode Data Mining,” Jurnal Informasi Dan Teknologi, vol. 5, no. 2, pp. 56–62, 2023, https://doi.org/10.37034/jidt.v5i1.324.
A. Agung, A. Daniswara, I. Kadek, and D. Nuryana, “Data Preprocessing Pola Pada Penilaian Mahasiswa Program Profesi Guru,” Journal of Informatics and Computer Science, vol. 05, no. 1, pp. 97–100, 2023, https://doi.org/10.26740/jinacs.v5n01.p97-100.
P. Palinggik Allorerung, A. Erna, M. Bagussahrir, and S. Alam, “Analisis Performa Normalisasi Data untuk Klasifikasi K-Nearest Neighbor pada Dataset Penyakit,” Jurnal Informatika Sunan Kalijaga), vol. 9, no. 3, pp. 178–191, Sep. 2024, https://doi.org/10.14421/jiska.2024.9.3.178-191.
A. Setiawan, Z. Hadryan Nst, Z. Khairi, and L. Efrizoni, “Klasifikasi Tingkat Risiko Diabetes Menggunakan Algoritma Random Forest,” Jurnal Informatika & Rekayasa Elektronika), vol. 7, no. 2, pp. 263–271, 2024, https://doi.org/10.36595/jire.v7i2.1259.
P. C. Pradhani, A. S. Indrayani, N. Azzarah, S. E. Aflikha, F. Zahra, and A. D. Kalifia, “Prediksi Diabetes Mellitus Berdasarkan Data Pasien Sylhet Diabetes Hospital Dengan Metode Naive Bayes,” Scientia: Jurnal Ilmiah Sain dan Teknolagi, vol. 3, no. 3, pp. 342–353, Jan. 2025, Accessed: Jun. 09, 2025. https://jurnal.researchideas.org/index.php/scientica/article/view/163/151
K. Huda and M. Ula, “Penerapan Naive Bayes, Regresi Logistik, Random Forest, Svm, Dan Knn Untuk Prediksi Diabetes,” SENASTIKA Universitas Malikussaleh, vol. 1, no. 1, pp. 1–10, Nov. 2024, Accessed: Jun. 09, 2025. https://proceedings.unimal.ac.id/senastika/article/view/853/580
M. D. Nurmalasari, K. Kusrini, and S. Sudarmawan, “Komparasi Algoritma Naive Bayes dan K-Nearest Neighbor untuk Membangun Pengetahuan Diagnosa Penyakit Diabetes,” Jurnal Komtika (Komputasi dan Informatika), vol. 5, no. 1, pp. 52–59, Jul. 2021, https://doi.org/10.31603/komtika.v5i1.5140.
Unduhan
Diterbitkan
Terbitan
Bagian
Lisensi
Hak Cipta (c) 2025 Mohammad Radja Alyfa Amri, Egi Permana, Pramana Anwas Panchadria, Shafirah Fitri

Artikel ini berlisensiCreative Commons Attribution-ShareAlike 4.0 International License.




