Analisis Sentiment Terhadap Diabetes Menggunakan Algoritma Naïve Bayes, Random Forest, SVM Pada Media Sosial X
Abstract
Diabetes is one of the chronic diseases that has received widespread attention in society, especially on social media X. This is due to the increasing number of sufferers every year. Based on data from the World Health Organization (WHO), in 2021 it is estimated that 537 million people aged 20-79 years are living with diabetes, an increase from the 2019 estimate of 463 million people. In addition, around 1.3 million deaths are caused by diabetes, with 4 percent of them occurring before the age of 70. This condition occurs due to high blood sugar levels that interfere with the body's metabolic functions, making it difficult for the body to process sugar optimally. This study aims to compare the performance of Naïve Bayes, Random Forest, and Support Vector Machine (SVM) algorithms in sentiment analysis related to diabetes. The research data was obtained from the Twitter platform with a total of 8,401 tweets collected using crawling techniques using certain keywords in the time span of 2024 to 2025. The data then went through a pre-processing stage to produce clean data. Tests were conducted to evaluate the accuracy of each model in predicting public sentiment. The test results show that the SVM algorithm provides the best performance with 85% accuracy, followed by Random Forest with 82% accuracy, and Naïve Bayes with 74% accuracy before the application of Synthetic Minority Oversampling Technique (SMOTE). After optimization using SMOTE, the SVM algorithm still showed the best performance with 96% accuracy, followed by Random Forest with 95% accuracy, and Naïve Bayes with 85% accuracy. Based on these results, SVM proved to be the most effective algorithm in classifying sentiment related to diabetes. It is hoped that the results of this research can contribute to efforts to manage diabetes through a better understanding of public perceptions.
Downloads
References
Y. F. Wijaya and A. Triayudi, “Perbandingan Algoritma Klasifikasi Data Mining Pada Prediksi Penyakit Diabetes,” Journal of Computer System and Informatics (JoSYC), vol. 5, no. 1, pp. 165–174, Nov. 2023, doi: 10.47065/josyc.v5i1.4614.
Y. Siagian, J. Hutahaean, A. Zikra Syah, J. Efendi Hutagalung, and A. Karim, “Implementasi Metode K-Nearest Neigbours (KNN) Untuk Klasifikasi Penyakit Diabetes,” Jurnal Informatika dan Teknologi Informasi, vol. 2, no. 3, pp. 253–262, Jan. 2024, doi: 10.56854/jt.v2i3.331.
H. Nugroho, S. Fadwa Syamlan Fakultas Kesehatan, U. Ichan Satya, J. Jombang Raya No, and T. Selatan, “Penyuluhan Kesehatan tentang Pengetahuan Pencegahan Diabetes Militus di Desa Rawat Rengas,” Jurnal Peduli Masyarakat, vol. 5, no. 4, pp. 1063–1070, Oct. 2023, doi: 10.37287/JPM.V5I4.2358.
P. Keperawatan and M. Bedah, “Skripsi Gambaran Kepatuhan Diet Pasien Diabetes Melitus Tipe 2 Di Puskesmas Poto Tano Kabupaten Sumbawa Barat Tahun 2020,” 2020.
R. M. Harun and F. Fahmi, “Perbandingan Algoritma Naïve Bayes, KNN, dan Decision Tree Pada Analisis Sentimen Terhadap Ulasan Aplikasi KitaLulus,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 3, pp. 2033–2042, 2024, doi: 10.47065/bits.v6i3.6367.
S. A. Sutresno, “Analisis Sentimen Masyarakat Indonesia Terhadap Dampak Penurunan Global Sebagai Akibat Resesi di Twitter,” Building of Informatics, Technology and Science (BITS), vol. 4, no. 4, Mar. 2023, doi: 10.47065/bits.v4i4.3149.
A. A. Asyer and M. A. I. P. I. Pakereng, “Analisis Sentimen Tweet Pengguna Twitter Terkait Diabetes Menggunakan Metode Naive Bayes,” Jutisi: Jurnal Ilmiah Teknik Informatika dan Sistem Informasi, vol. 12, no. 2, pp. 627–636, 2023, doi: 10.35889/jutisi.v12i2.1234.
J. Adiputra and D. Mahdiana, “Analisis Sentimen Dengan Algoritma Support Vector Machine Terhadap Penyakit Hepatitis Akut Misterius,” IDEALIS : InDonEsiA journaL Information System, vol. 6, no. 1, pp. 1–8, Jan. 2023, doi: 10.36080/IDEALIS.V6I1.2985.
L. Sari, A. Romadloni, and R. Listyaningrum, “Penerapan Data Mining dalam Analisis Prediksi Kanker Paru Menggunakan Algoritma Random Forest,” Infotekmesin, vol. 14, no. 1, pp. 155–162, Jan. 2023, doi: 10.35970/infotekmesin.v14i1.1751.
P. Elisa and A. Rahman Isnain, “Comparison Of Random Forest, Support Vector Machine And Naive Bayes Algorithms To Analyze Sentiment Towards Mental Health Stigma,” Jurnal Teknik Informatika (JUTIF), vol. 5, no. 1, pp. 321–329, 2024, doi: 10.52436/1.jutif.2024.5.1.1817.
M. Y. Aldean, P. Paradise, and N. A. S. Nugraha, “Analisis Sentimen Masyarakat Terhadap Vaksinasi Covid-19 di Twitter Menggunakan Metode Random Forest Classifier (Studi Kasus: Vaksin Sinovac),” Journal of Informatics Information System Software Engineering and Applications (INISTA), vol. 4, no. 2, pp. 64–72, Jun. 2022, doi: 10.20895/INISTA.V4I2.575.
R. Nurhidayat and N. Hendrastuty, “Analisis Sentimen Komentar Media Sosial Twitter Terhadap Tes CPNS dengan Algoritma Naive Bayes,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 3, pp. 1477–1489, 2024, doi: 10.47065/bits.v6i3.6148.
J. Khab Sulaiman Dalam, A. Oktavia Praneswara, N. Cahyono, and U. Amikom Yogyakarta, “Analisis Sentimen Ulasan Aplikasi TikTok Shop Seller Center di Google Playstore Menggunakan Algoritma Naive Bayes,” The Indonesian Journal of Computer Science, vol. 12, no. 6, p. 3925, Dec. 2023, doi: 10.33022/IJCS.V12I6.3473.
N. Hendrastuty, A. Rahman Isnain, and A. Yanti Rahmadhani, “Analisis Sentimen Masyarakat Terhadap Program Kartu Prakerja Pada Twitter Dengan Metode Support Vector Machine,” Jurnal Informatika: Jurnal Pengembangan IT, vol. 6, no. 3, pp. 150–155, Oct. 2021, doi: 10.30591/JPIT.V6I3.2870.
R. R. Salam, M. F. Jamil, Y. Ibrahim, R. Rahmaddeni, S. Soni, and H. Herianto, “Analisis Sentimen Terhadap Bantuan Langsung Tunai (BLT) Bahan Bakar Minyak (BBM) Menggunakan Support Vector Machine,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 3, no. 1, pp. 27–35, May 2023, doi: 10.57152/MALCOM.V3I1.590.
D. Toresa, S. Rico, F. Sitorus, I. Muzdalifah, F. Wiza, and R. Syelly, “Analisis Sentimen Terhadap Ulasan Penggunaan Dompet Digital Dana Mengunakan Metode Klasifikasi Support Vector Machine,” Technologica, vol. 3, no. 2, pp. 64–74, Jul. 2024, doi: 10.55043/TECHNOLOGICA.V3I2.163.
S. Sari et al., “Analisis Sentimen Terhadap Komentar Beauty Shaming Di Media Sosial Twitter Menggunakan Algoritma SentiStrength,” Indonesian Journal of Informatic Research and Software Engineering (IJIRSE), vol. 1, no. 1, pp. 71–78, Apr. 2021, doi: 10.57152/IJIRSE.V1I1.55.
A. Syah, F. Nurdiyansyah, and A. Y. Rahman, “Analisis Sentimen Aplikasi Shopee, Tokopedia, Lazada Dan Blibli Menggunakan Leksikon Dan Random Forest,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 12, no. 3S1, Oct. 2024, doi: 10.23960/jitet.v12i3S1.5155.
I. K. Dharmendra, I. M. A. W. Putra, and Y. P. Atmojo, “Evaluation of the Effectiveness of SMOTE and Random Under Sampling in Emotion Classification of Tweets,” INFORMATICS FOR EDUCATORS AND PROFESSIONAL : Journal of Informatics, vol. 9, no. 2, pp. 182–193, Dec. 2024, doi: 10.51211/ITBI.V9I2.3183.
D. Alita and A. R. Isnain, “Pendeteksian Sarkasme pada Proses Analisis Sentimen Menggunakan Random Forest Classifier,” Jurnal Komputasi, vol. 8, no. 2, pp. 50–58, 2020.
S. Rabbani, D. Safitri, N. Rahmadhani, A. A. F. Sani, and M. K. Anam, “Perbandingan Evaluasi Kernel SVM untuk Klasifikasi Sentimen dalam Analisis Kenaikan Harga BBM,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 3, no. 2, pp. 153–160, Oct. 2023, doi: 10.57152/malcom.v3i2.897.
E. Dwi, K. Wardani, F. Febiola Yo, W. N. Meylugita, F. Sains, and D. Teknologi, “Implementasi Algoritma Naïve Bayes Untuk Analisis Ulasan Pengguna Untuk Aplikasi Seabank Di Google Play Store Implementation Of The Naive Bayes Algorithm For User Review Analysis Of The Seabank Application On Google Play Store,” Jurnal Kecerdasan Buatan dan Teknologi Informasi, vol. 4, no. 1, pp. 2963–6191, 2025, doi: 10.69916/jkbti.v4i1.193.
S. A. Riyandona, N. Rahaningsih, R. D. Dana, and - Mulyawan, “Implementasi Model Analisis Sentimen Terhadap Grup Musik Bts Menggunakan Metode Naïve Bayes,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 13, no. 1, Jan. 2025, doi: 10.23960/jitet.v13i1.5816.
R. Z. Firdaus, S. H. Wijoyo, and W. Purnomo, “Analisis Sentimen Berbasis Aspek Ulasan Pengguna Aplikasi Alfagift Menggunakan Metode Random Forest dan Pemodelan Topik Latent Dirichlet Allocation,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 9, no. 2, 2025.
I. Amelia, Sugiyono, F. M. Sarimole, and Tundo, “Analisis Sentimen Tanggapan Pengguna Media Sosial X Terhadap Program Beasiswa KIP-Kuliah dengan Menggunakan Algoritma Support Vector Machine (SVM),” Jurnal Indonesia : Manajemen Informatika dan Komunikasi, vol. 5, no. 3, pp. 2994–3003, Sep. 2024, doi: 10.35870/JIMIK.V5I3.990.
M. G. Andriawan and T. Ernawati, “PENGGUNAAN ALGORITMA NAÏVE BAYES DAN SUPPORT VECTOR MACHINE UNTUK ANALISIS SENTIMEN KONFLIK PALESTINA DAN ISRAEL PADA PLATFORM X,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 12, no. 3, Aug. 2024, doi: 10.23960/jitet.v12i3.4943.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Analisis Sentiment Terhadap Diabetes Menggunakan Algoritma Naïve Bayes, Random Forest, SVM Pada Media Sosial X
Pages: 2469-2479
Copyright (c) 2025 Linda Apriani, Nirwana Hendrastuty

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).