Comparison of Support Vector Machine and Naïve Bayes to Sentiment Analysis of Military Barracks Program
DOI:
https://doi.org/10.47709/cnahpc.v7i3.6515Keywords:
Sentiment Analysis, military barracks, Naïve Bayes, SVM, case folding, Normalization, stopword removal, tokenizing, stemming, Confusion MatrixAbstract
Sentiment analysis is a study that analyzes a person's emotions about a problem. The military barracks program proposed by the Governor of West Java has drawn pros and cons from the community, especially in application X. Some people consider this program to be the right solution to discipline and shape the character of students, others think that the program can take away children's freedom and rights and does not guarantee any change in character after the students leave the military barracks. Therefore, a sentiment analysis was conducted with the aim of understanding public sentiment and comparing the accuracy of the SVM and Naïve Bayes in predicting public sentiment towards the military barracks program. The method in this study begins with data crawling, data selection, labeling, data preprocessing (data cleaning, normalization, case folding, stopword removal, tokenizing, stem), TF-IDF, Word Cloud, classification with Naïve Bayes and SVM, ending with a Confusion Matrix. In contrast to SVM, which revealed that 1429 tweets had positive sentiment and 447 had negative sentiment, Naïve Bayes results indicated that 1309 tweets had positive sentiment and 567 had negative sentiment. The accuracy value of the Naïve Bayes was 91.24%, the precision was 99.73%, and the recall was 82.94%. In contrast, the SVM achieved 92.16%, the precision was 97.86%, and the recall was 86.40%. Based on these findings, it can be said that the SVM is more accurate than Naïve Bayes and that the public generally has a favorable opinion of the military barracks program.
Downloads
References
Abei, F., Sulaeman, A. A., & Suprapto, S. (2025). Twitter Sentiment Towards 2024 Jakarta Governor Candidates With Naïve Bayes Algorithm. Journal of Computer Networks, Architecture and High Performance Computing, 7(1), 265–277. https://doi.org/10.47709/cnahpc.v7i1.5358
Budiarto, J. (2021). Identifikasi Kebutuhan Masyarakat Nusa Tenggara Barat pada Pandemi Covid-19 di Media Sosial dengan Metode Crawling. JTIM?: Jurnal Teknologi Informasi Dan Multimedia, 2(4), 244–250. https://doi.org/10.35746/jtim.v2i4.119
Dwisyahputra, A. A., & Kurniawan, R. (2024). Sentiment Analysis of Public Comments on Coldplay Concerts on Twitter Using the Naïve Bayes Method. Journal of Computer Networks, Architecture and High Performance Computing, 6(3), 1097–1111. https://doi.org/10.47709/cnahpc.v6i3.4202
Friska Aditia Indriyani, Ahmad Fauzi, & Sutan Faisal. (2023). Analisis sentimen aplikasi tiktok menggunakan algoritma naïve bayes dan support vector machine. TEKNOSAINS?: Jurnal Sains, Teknologi Dan Informatika, 10(2), 176–184. https://doi.org/10.37373/tekno.v10i2.419
Hidayah, I. A. H., Kusumawati, R., Abidin, Z., & Imamuddin, M. (2024). Analysis of Public Sentiment Towards The TikTok Application Using The Naive Bayes Algorithm and Support Vector Machine. Journal of Computer Networks, Architecture and High Performance Computing, 6(2), 881–891. https://doi.org/10.47709/cnahpc.v6i2.3990
Husada, H. C., & Paramita, A. S. (2021). Analisis Sentimen Pada Maskapai Penerbangan di Platform Twitter Menggunakan Algoritma Support Vector Machine (SVM). Teknika, 10(1), 18–26. https://doi.org/10.34148/teknika.v10i1.311
Jusli, D. T. A., & Kurniawan, R. (2024). Analysis Of Opinion Sentiment Towards Electric Vehicle Tax On Social Media X Using The Support Vector Machine (SVM) Method. Journal of Computer Networks, Architecture and High Performance Computing, 6(4), 1792–1808. https://doi.org/10.47709/cnahpc.v6i4.4739
Mahendra, M. H., Murdiansyah, D. T., & Lhaksmana, K. M. (2023). Analisis Sentimen Tweet COVID-19 menggunakan K-Nearest Neighbors dengan TF-IDF dan Ekstraksi Fitur CountVectorizer. DIKE?: Jurnal Ilmu Multidisiplin, 1(2), 37–43. https://doi.org/10.69688/dike.v1i2.35
Maulana, B. A., Fahmi, M. J., Imran, A. M., & Hidayati, N. (2024). Analisis Sentimen Terhadap Aplikasi Pluang Menggunakan Algoritma Naive Bayes dan Support Vector Machine (SVM). MALCOM: Indonesian Journal of Machine Learning and Computer Science, 4(2), 375–384. https://doi.org/10.57152/malcom.v4i2.1206
Nursinggah, L., Ruuhwan, R., & Mufizar, T. (2024). Analisis Sentimen Pengguna Aplikasi X Terhadap Program Makan Siang Gratis Dengan Metode Naïve Bayes Classifier. Jurnal Informatika Dan Teknik Elektro Terapan, 12(3). https://doi.org/10.23960/jitet.v12i3.4336
Pane, S. F., & Ramdan, J. (2022). Pemodelan Machine Learning?: Analisis Sentimen Masyarakat Terhadap Kebijakan PPKM Menggunakan Data Twitter. Jurnal Sistem Cerdas, 5(1), 12–20. https://doi.org/10.37396/jsc.v5i1.191
Putri, G. R., Maulana, M. A., & Bahri, S. (2024). Perbandingan Algoritma Naïve Bayes dan TextBlob Untuk Mendapatkan Analisis Sentimen Masyarakat Pada Sosial Media. Teknika, 13(2), 213–218. https://doi.org/10.34148/teknika.v13i2.815
Runimeirati, Abdul Muis, & Figur Muhammad. (2023). Pelatihan Text Mining Menggunakan Bahasa Pemrograman Python. Abdimas Langkanae, 3(1), 36–46. https://doi.org/10.53769/abdimas.3.1.2023.83
Setio, B., & Prasetyaningrum, P. (2021). Penerapan Data Mining Dalam Mengelompokkan Kunjungan Wisatawan Di Kota Yogyakarta Menggunakan Metode K-Means. Journal of Computer Science and Technology (JCS-TECH), 1(1), 27–32. https://doi.org/10.54840/jcstech.v1i1.9
Undamayanti, E., Iman Hermanto, T., Kaniawulan, I., Studi, P., Informatika, T., Teknologi, S. T., & Purwakarta, W. (2022). Analisis Sentimen Menggunakan Metode Naive Bayes Berbasis Particle Swarm Optimization Terhadap Pelaksanaan Program Merdeka Belajar Kampus Merdeka. Jurnal Sains Komputer & Informatika (J-SAKTI, 6(2), 916–930.
Widiawati, C. R. A., & Wahid, A. M. (2025). PEMROSESAN BAHASA ALAMI Konsep, Algoritma & Implementasi. Zahira Media Publisher. https://books.google.co.id/books?id=bKlOEQAAQBAJ
Wijaya, T. N., Indriati, R., & Muzaki, M. N. (2021). Analisis Sentimen Opini Publik Tentang Undang-Undang Cipta Kerja Pada Twitter. Jambura Journal of Electrical and Electronics Engineering, 3(2), 78–83. https://doi.org/10.37905/jjeee.v3i2.10885
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Salsabilla Choerunnisa Nurzanah; Mila Siti Armilah, Fajar Arianto, Supriadi, Hadi Prasetyo Utomo

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.











