Analisis Sentimen Vaksinasi Booster Berdasarkan Twitter Menggunakan Algoritma Naïve Bayes dan K-NN

 Afid Rozaqi (Universitas Nasional, Jakarta, Indonesia)
 (*)Agung Triayudi Mail (Universitas Nasional, Jakarta, Indonesia)
 Rima Tamara Aldisa (Universitas Nasional, Jakarta, Indonesia)

(*) Corresponding Author

Submitted: September 26, 2022; Published: September 30, 2022


Covid-19 or the corona virus has spread throughout the world, one of which is Indonesia. There have been many problems due to this virus for 2 years in Indonesia, and various efforts and policies have been made by the government to control the impact that does not become worse by this corona virus, these efforts are vaccination actions against the Indonesian people, and in early 2022 the government started a new program, namely booster vaccination. Many people are pro and contra to the program on social media Twitter. This study was conducted with the aim of knowing the sentiment of Indonesians towards booster vaccination in Indonesia.The data obtained as many as 2000 tweets obtained from the keyword "booster vaccine" on Twitter. Then the data is divided into training data and test data (training) then made into three different portions, namely 60/40, 70/30, and 80/20. The test results are that the best performance is found in testing a portion of 80% of the training data 20% of the test data using the K-NN algorithm, the test produced the highest value results, namely 78.62% accuracy and AUC 0.845 and categorized as good classification. The results show that the K-NN algorithm model with an 80% portion of training data is the best in the classification of booster vaccination sentiment analysis. The sentiment results in the test data were positive with 303 tweet data and negative sentiment totaled 93 tweet data. The results of more positive sentiments show that booster vaccinations in Indonesia are acceptable and get a lot of support from the Indonesian people on social media Twitter.


Coronavirus; Booster Vaccination; Sentiment; Naïve Bayes; K-NN.

Full Text:


Article Metrics

Abstract view : 165 times
PDF - 134 times


A. F. Watratan, A. P. B, D. Moeis, S. Informasi, and S. P. Makassar, “JOURNAL OF APPLIED COMPUTER SCIENCE AND TECHNOLOGY ( JACOST ) Implementasi Algoritma Naive Bayes Untuk Memprediksi Tingkat Penyebaran Covid-19 Di Indonesia,” vol. 1, no. 1, pp. 7–14, 2020.

A. Susilo et al., “Coronavirus Disease 2019: Tinjauan Literatur Terkini,” J. Penyakit Dalam Indones., vol. 7, no. 1, p. 45, 2020, doi: 10.7454/jpdi.v7i1.415.

D. Ramadhan and E. B. Setiawan, “Analisis Sentimen Program Acara di SCTV pada Twitter Menggunakan Metode Naive Bayes dan Support Vector Machine,” … .Telkomuniversity.Ac.Id, vol. 6, no. 2, pp. 9736–9743, 2019, [Online]. Available:

S. H. Lee, Y. W. Cho, E. T. Im, and G. Y. Gim, “A Study on Customer Satisfaction Analysis of Public Institutions using Social Textmining,” Proc. - 20th IEEE/ACIS Int. Conf. Softw. Eng. Artif. Intell. Netw. Parallel/Distributed Comput. SNPD 2019, pp. 385–394, 2019, doi: 10.1109/SNPD.2019.8935791.

I. Hidayanti, T. B. Kurniawan, and A. Afriyudi, “Perbandingan Dan Analisis Metode Klasifikasi Untuk Menentukan Konsentrasi Jurusan,” J. Ilm. Inform. Glob., vol. 11, no. 1, pp. 16–21, 2020, doi: 10.36982/jig.v11i1.1067.

I. Lishania, R. Goejantoro, and Y. N. Nasution, “Perbandingan Klasifikasi Metode Naive Bayes dan Metode Decision Tree Algoritma (J48) pada Pasien Penderita Penyakit Stroke di RSUD Abdul Wahab Sjahranie Samarinda,” J. Eksponensial, vol. 10, no. 2, pp. 135–142, 2019, [Online]. Available:

U. Riyanto, “Analisis Perbandingan Algoritma Naive Bayes Dan Support Vector Machine Dalam Mengklasifikasikan Jumlah Pembaca Artikel Online,” JIKA (Jurnal Inform., vol. 2, no. 2, pp. 62–72, 2019, doi: 10.31000/.v2i2.1521.

Ainurrohmah, “Akurasi Algoritma Klasifikasi pada Software Rapidminer dan Weka,” Prisma, vol. 4, pp. 493–499, 2021, [Online]. Available:

S. H. Ramadhani and M. I. Wahyudin, “Analisis Sentimen Terhadap Vaksinasi Astra Zeneca pada Twitter Menggunakan Metode Naïve Bayes dan K-NN,” J. JTIK (Jurnal Teknol. Inf. dan Komunikasi), vol. 6, no. 4, pp. 526–534, 2022, doi: 10.35870/jtik.v6i4.530.

M. Syarifuddin, “Analisis Sentimen Opini Publik Mengenai Covid-19 Pada Twitter Menggunakan Metode Naïve Bayes Dan Knn,” Inti Nusa Mandiri, vol. 15, no. 1, pp. 23–28, 2020.

A. Bayhaqy, “Sentiment Analysis about E-Commerce from Tweets Using Decision Tree , K-Nearest Neighbor , and Naïve Bayes,” 2018 Int. Conf. Orange Technol., pp. 1–6.

H. Sudira, A. L. Diar, and Y. Ruldeviyani, “Instagram Sentiment Analysis with Naive Bayes and KNN: Exploring Customer Satisfaction of Digital Payment Services in Indonesia,” 2019 Int. Work. Big Data Inf. Secur. IWBIS 2019, pp. 21–26, 2019, doi: 10.1109/IWBIS.2019.8935700.


D. Xhemali, C. J. Hinde, and R. G. Stone, “Naive Bayes vs. Decision Trees vs. Neural Networks in the Classification of Training Web Pages,” Int. J. Comput. Sci., vol. 4, no. 1, pp. 16–23, 2009, [Online]. Available:

S. Nasional, T. Elektro, S. Informasi, and T. Informatika, “Studi Komparasi Metode Klasifikasi K-Nearest Neghbor dan Naïve Bayes dalam Mengidentifikasi Kepuasan Pelanggan Terhadap Produk,” pp. 333–338, 2022.

S. Raschka, “Model Evaluation, Model Selection, and Algorithm Selection in Machine Learning,” 2018, [Online]. Available:

E. A. Sukma, A. N. Hidayanto, A. I. Pandesenda, A. N. Yahya, P. Widharto, and U. Rahardja, “Sentiment Analysis of the New Indonesian Government Policy (Omnibus Law) on Social Media Twitter,” Proc. - 2nd Int. Conf. Informatics, Multimedia, Cyber, Inf. Syst. ICIMCIS 2020, no. July 2017, pp. 153–158, 2020, doi: 10.1109/ICIMCIS51567.2020.9354287.

D. K. Widiyati, M. Wati, and H. S. Pakpahan, “Penerapan Algoritma ID3 Decision Tree Pada Penentuan Penerima Program Bantuan Pemerintah Daerah di Kabupaten Kutai Kartanegara,” J. Rekayasa Teknol. Inf., vol. 2, no. 2, p. 125, 2018, doi: 10.30872/jurti.v2i2.1864.

M. M. Ikram, “Keputusan Penggunaan Layanan GoFood Selama Masa Pandemi Covid-19,” J. Ilm. Manaj. Kesatuan, vol. 9, no. 2, pp. 71–80, 2021, doi: 10.37641/jimkes.v9i2.467.

F. Fitriana, E. Utami, and H. Al Fatta, “Analisis Sentimen Opini Terhadap Vaksin Covid - 19 pada Media Sosial Twitter Menggunakan Support Vector Machine dan Naive Bayes,” J. Komtika (Komputasi dan Inform., vol. 5, no. 1, pp. 19–25, 2021, doi: 10.31603/komtika.v5i1.5185.

Aldisa, R. T., & Maulana, P. (2022). Analisis Sentimen Opini Masyarakat Terhadap Vaksinasi Booster COVID-19 Dengan Perbandingan Metode Naive Bayes, Decision Tree dan SVM. Building of Informatics, Technology and Science (BITS), 4(1), 106-109.

Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Analisis Sentimen Vaksinasi Booster Berdasarkan Twitter Menggunakan Algoritma Naïve Bayes dan K-NN


  • There are currently no refbacks.

Copyright (c) 2022 Afid Rozaqi, Agung Triayudi, Rima Tamara Aldisa

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

Jurnal Sistem Komputer dan Informatika (JSON)
Dikelola oleh STMIK Budi Darma
Sekretariat : Jln. Sisingamangaraja No. 338 Telp 061-7875998
email :

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