Analysis of public opinion sentiment against COVID-19 in Indonesia on twitter using the k-nearest neighbor algorithm and decision tree

Main Article Content

Ryo Pambudi
Faiq Madani

Abstract

COVID-19 has become an ongoing disease pandemic across the globe. The need for information makes social media such as twitter a place to exchange information. This tweet can be used to see public sentiment towards COVID-19 in Indonesia. Sentiment analysis classifies opinions from tweets that have been processed and classified into different sentiments, namely negative, neutral, or positive. The aim of this paper is to find the algorithm that has the best accuracy. The researcher proposes to compare the K-Nearest Neighbors (KNN) and decision tree algorithms to be used in the classification of sentiment data from tweets related to COVID-19 that took place in Indonesia. The results of the evaluation of performance metrics concluded that the decision tree algorithm has a higher level of accuracy than KNN. Decision tree produces accuracy = 0.765, error = 0.235, recall = 0.76, and precision = 0.767 which is better when compared to KNN which produces accuracy = 0.69, error = 0.31, recall = 0.66, and precision = 0.702.

Downloads

Download data is not yet available.

Article Details

How to Cite
[1]
R. Pambudi and F. Madani, “Analysis of public opinion sentiment against COVID-19 in Indonesia on twitter using the k-nearest neighbor algorithm and decision tree”, J. Soft Comput. Explor., vol. 3, no. 2, pp. 117 - 122, Sep. 2022.
Section
Articles

References

M. T. Hasan, “The sum of all scares COVID-19 sentiment and asset return,” Q. Rev. Econ. Financ., vol. 86, pp. 332–346, 2022.

Z. Lyu and H. Takikawa, “Media framing and expression of anti-China sentiment in COVID-19-related news discourse: An analysis using deep learning methods,” Heliyon, vol. 8, no. 8, p. e10419, 2022.

R. Djalante et al., “Review and analysis of current responses to COVID-19 in Indonesia: Period of January to March 2020,” Prog. Disaster Sci., vol. 6, 2020.

A. V. Pelt, H. A. Glick, W. Yang, D. Rubin, M. Feldman, and S. Kimmel, “Evaluation of COVID-19 testing strategies for repopulating college and university campuses: a decision tree analysis,” J. Adolesc. helath, vol. 68, pp. 28–34, 2020.

M. Qorib, T. Oladunni, M. Denis, E. Ososanya, and P. Cotae, “COVID-19 vaccine hesitancy : text mining , sentiment analysis and machine learning on COVID-19 vaccination twitter dataset,” Expert Syst. Appl., p. 118715, 2022.

Y. Didi, A. Walha, and A. Wali, “COVID-19 tweets classification based on a hybrid word embedding method,” Big Data Cogn. Comput., vol. 6, no. 2, p. 58, 2022.

K. Chakraborty, S. Bhatia, S. Bhattacharyya, J. Platos, R. Bag, and A. E. Hassanien, “Sentiment Analysis of COVID-19 tweets by Deep Learning Classifiers—A study to show how popularity is affecting accuracy in social media,” Appl. Soft Comput. J., vol. 97, p. 106754, 2020.

C. Shofiya and S. Abidi, “Sentiment analysis on COVID-19 related social distancing in Canada using twitter data,” Int. J. Environ. Res. Public Health, vol. 18, no. 11, p. 5993, 2021.

J. X. Koh and T. M. Liew, “How loneliness is talked about in social media during COVID-19 pandemic: Text mining of 4,492 Twitter feeds,” J. Psychiatr. Res., vol. 145, no. October 2020, pp. 317–324, 2022.

D. A. Efrilianda, E. N. Dianti, and O. G. Khoirunnisa, “Analysis of twitter sentiment in COVID-19 era using fuzzy logic method,” J. Soft Comput. Explor., vol. 1, no. 1, pp. 1–5, 2021.

J. Abraham, D. Higdon, and J. Nelson, “Cryptocurrency price prediction using tweet volumes and sentiment analysis,” SMU Data Sci. Rev., vol. 1, no. 3, p. 22, 2018.

F. Es-Sabery et al., “A MapReduce Opinion Mining for COVID-19-Related Tweets Classification Using Enhanced ID3 Decision Tree Classifier,” IEEE Access, vol. 9, pp. 58706–58739, 2021.

V. A. Fitri, R. Andreswari, and M. A. Hasibuan, “Sentiment Analysis of Social Media Twitter with Case of Anti- LGBT Campaign in Indonesia using Naïve Bayes, Decision Tree, LGBT Campaign in Indonesia using Naïve Bayes, Decision Tree, and Random Forest Algorithm,” Procedia Comput. Sci., vol. 161, pp. 765–772, 2019.

T. Mustaqim, K. Umam, and M. A. Muslim, “Twitter text mining for sentiment analysis on government’s response to forest fires with vader lexicon polarity detection and k-nearest neighbor algorithm,” in J. Phys.: Conf. Ser., 2020, vol. 1567, no. 3, p. 32024.

A. Skuza Michałand Romanowski, “Sentiment analysis of Twitter data within big data distributed environment for stock prediction,” Proc. 2015 Fed. Conf. Comput. Sci. Inf. Syst. FedCSIS 2015, vol. 5, pp. 1349–1354, 2015.

A. Falasari and M. A. Muslim, “Optimize Naïve Bayes Classifier Using Chi Square and Term Frequency Inverse Document Frequency For Amazon Review Sentiment Analysis,” J. Soft Comput. Explor., vol. 3, no. 1, pp. 31–36, 2022.

W. B. Zulfikar, M. Irfan, C. N. Alam, and M. Indra, “The Comparation of Text Mining With Naive Bayes Classifier , Nearest Neighbor , and Decision Tree to Detect Indonesian Swear Words on Twitter,” 2017 5th Int. Conf. Cyber IT Serv. Manag. (CITSM). IEEE, pp. 1–5, 2017.

Y. F. Safri, R. Arifudin, and M. A. Muslim, “K-Nearest Neighbor and Naive Bayes Classifier Algorithm in Determining The Classification of Healthy Card Indonesia Giving to The Poor,” Sci. J. Informatics, vol. 5, no. 1, p. 18, 2018.

A. Bayhaqy, S. Sfenrianto, K. Nainggolan, and E. R. Kaburuan, “Sentiment Analysis about E-Commerce from Tweets Using Decision Tree, K-Nearest Neighbor, and Naïve Bayes,” 2018 Int. Conf. Orange Technol. ICOT 2018, no. October, 2018.

A. Susanto, D. Sinaga, C. A. Sari, E. H. Rachmawanto, and D. R. I. M. Setiadi, “A High Performace of Local Binary Pattern on Classify Javanese Character Classification,” Sci. J. Informatics, vol. 5, no. 1, p. 8, 2018.

S. Hota and S. Pathak, “KNN classifier based approach for multi-class sentiment analysis of twitter data,” Int. J. Eng. Technol., vol. 7, no. 3, pp. 1372–1375, 2018.

B. Prasetiyo, M. A. Muslim, and N. Baroroh, “Evaluation performance recall and F2 score of credit card fraud detection unbalanced dataset using SMOTE oversampling technique,” in J. Phys.: Conf. Ser., 2021, vol. 1918, no. 4, p. 42002.

Abstract viewed = 212 times