Comparison of Naïve Bayes Algorithm, Support Vector Machine and Decision Tree in Analyzing Public Opinion on COVID-19 Vaccination in Indonesia

Rahmaddeni Rahmaddeni, Firman Akbar


The spread of COVID-19 in Indonesia has caused many negative impacts. Therefore, the government is taking vaccination measures to suppress the spread of COVID-19. Public response to vaccinations on Twitter has been mixed, with some supporting it and some not. The data for this study comes from the Twitter feed of the drone portal Emprit Academy (dea). Classification is performed using SVM, decision tree and Naive Bayes algorithm. The purpose of this study is to inform the public about whether vaccination against COVID-19 is inclined toward positive, neutral, or negative opinions. Moreover, this study compares the accuracy of the three algorithms used, namely Naive Bayes (NB), Support Vector Machine (SVM) and Decision Tree, and the validation performed using the K-Fold Cross-Validation method, AdaBoost feature selection, and the TF-IDF Transformer feature extraction test. The result obtained from this study is that the accuracy of the 90:10 data keeps improving, dividing by 82.86% on the SVM algorithm, 81.43% on the Naive Bayes and 78.57% on the decision tree.


Decision Tree;Naïve Bayes Classifier;Support Vector Machine;Sentiment Analysis

Full Text:



Aljameel SS, Alabbad DA, Alzahrani NA, Alqarni SM, Alamoudi FA, Babili LM, et al. A sentiment analysis approach to predict an individual's awareness of the precautionary procedures to prevent covid-19 outbreaks in Saudi Arabia. Int J Environ Res Public Health 2021;18:1–12.

Rachman FF, Pramana S. Analysis of the Pros and Cons of Indonesian Society Sentiments about the COVID-19 Vaccine on Twitter Social Media. Health Information Management Journal ISSN 2020;8:2655–9129.

Ratino R, Hafidz N, Anggraeni S, Gata W. Sentiment Analysis of Covid-19 Information using Support Vector Machine and Nave Bayes. J JUPITER 2020;12:1–11.

Mustakim, Nurul Gayatri Indah R, Novita R, Kharisma OB, Vebrianto R, Sanjaya S, et al. DBSCAN algorithm: Twitter text clustering of trend topic for the local election in Pekanbaru. J Phys Conf Ser 2019;1363.

Kartino A, Khairul Anam M, Rahmaddeni R, Junadhi J. Analysis of Influential Twitter Accounts related to Covid-19 using Social Network Analysis. RESTI Journal (Systems and Information Technology Engineering) 2021;5:697–704.

Que KVS, Iriani A, Purnomo HD. Online Transportation Sentiment Analysis Using Support Vector Machine Based on Particle Swarm Optimization. National Journal of Electrical Engineering and Information Technology | 2020;9:162–70.

Kurniawan R, Apriliani A. Analysis of Public Sentiment Against the Corona Virus Based on Opinions from Twitter Based on a Web Scraper. Journal of Instek (Science And Technology Informatics) 2020;5:67–75.

Cahyono Y. Sentiment Analysis on Twitter Social Media Using Naïve Bayes Classifier with Feature Selection Particle Swarm Optimization and Term Frequency. Journal of Informatics Pamulang University 2017;2:35–42.

Mahardhika YS, Zuliarso E. Analysis of Sentiment Against Joko Widodo's Government on Twitter Social Media Using the Naïve Bayes Classifier Algorithm. SYNTAK 2018;2.

Nurhuda F, Sihwi SW, Doewes A. Analysis of Public Sentiment towards Indonesia's 2014 Presidential Candidate based on Opinion from Twitter Using the Naive Bayes Classifier Method. ITSmart: Journal of Technology and Information 2013;2.

Wulan S, Vitandy U, Supianto AA, Abdurrachman Bachtiar F. Sentiment Analysis of Lecturer Performance Evaluation using Term Frequency-Inverse Document Frequency and Naïve Bayes Classifier. Journal of Information Technology and Computer Science Development 2019;3:6080–8.

Gunawan B, Pratiwi HS, Pratama EE. Sentiment Analysis System on Product Reviews Using Naive Bayes Method. JEPIN (Journal of Informatics Education and Research) 2018;4:17–29.

Sari FV, Wibowo A. JD.ID Online Store Customer Sentiment Analysis Using Naïve Bayes Classifier Method Based on Emotion Icon Conversion. Journal of SIMETRIS 2019;10.

Permadi VA. Sentiment Analysis Using Naïve Bayes Algorithm Against Restaurant Reviews in Singapore. Journal of the Informatics Exchange 2020;11.

Syarifuddinn M. Analysis of Public Opinion Sentiment on the Effect of PSBB on Twitter with Decision Tree, KNN, and Naïve Bayes Algorithms. INTI Nusa Mandiri 2020;15:87–94.

Puspita R, Widodo A. Comparison of KNN, Decision Tree, and Nave Bayes Methods on Sentiment Analysis of BPJS Service Users. Journal of Informatics Pamulang University 2021; 5:646.

Romadloni TN, Santoso I, Budilaksono S. Comparison of Naïve Bayes, KNN and Decision Tree Methods on Commuter Line KRL Transportation Sentiment Analysis. IKRAITH-INFORMATIKA 2019;3.

Lutfi AA, Permanasari AE, Fauziati S. Sentiment Analysis in the Sales Review of Indonesian Marketplace by Utilizing Support Vector Machine. Journal of Information Systems Engineering and Business Intelligence 2018;4:57–64.

Rahmaddeni R, Khairul Anam M, Irawan Y, Susanti S, Jamaris M. Comparison of support vector machine and XGBSVM in analyzing public opinion on Covid-19 vaccination. ILKOM Scientific Journal 2022;14:32–8.

Imamah I, Husni H, Rachman EM, Suzanti IO, Mufarroha FA. Text Mining and Support Vector Machine for Sentiment Analysis of Tourist Reviews in Bangkalan Regency. J Phys Conf Ser 2020;1477.

Luqyana WA, Cholissodin I, Perdana RS. Cyberbullying Sentiment Analysis on Instagram Comments with the Support Vector Machine Classification Method. Journal of Information Technology and Computer Science Development 2018;2:4704–13.

Taufik I, Pamungkas SA. Sentiment Analysis Against Public Figures Using the Support Vector Machine (SVM) Algorithm. Journal “ LOG!K@ ” 2018;8:69–79.



  • There are currently no refbacks.

Office and Secretariat:

Big Data Research Centre
Puzzle Research Data Technology (Predatech)
Laboratory Building 1st Floor of Faculty of Science and Technology
UIN Sultan Syarif Kasim Riau

Jl. HR. Soebrantas KM. 18.5 No. 155 Pekanbaru Riau – 28293
Phone: 085275359942

Click Here for Information

Journal Indexing:

Google Scholar | ROAD | PKP Index | BASE | ESJI | General Impact Factor | Garuda | Moraref | One Search | Cite Factor | Crossref | WorldCat | Neliti  | SINTA | Dimensions | ICI Index Copernicus