Comparing the Performance of Data Mining Algorithms in Predicting Sentiments on Twitter
Abstract
On Twitter, users can post tweets, videos, and images. It can, however, also be disruptive and difficult. To categorize the material and improve searchability, hashtags are crucial. This study focuses on examining the opinions of Twitter users who participate in trending topics. The algorithms K-Nearest Neighbor (KNN) and Support Vector Machine (SVM) are used for sentiment analysis. The data set comprises tweet information on popular topics that was collected using the Twitter API and saved in Excel format. SVM and K-NN are used for data preparation, weighting, and sentiment analysis. With 105 data points, the study provides insight into user sentiment. SVM identified 99% of positive responses and 1% of negative responses with an accuracy of 80%. KNN successfully identified 90% of the positive responses and 10% of the negative responses, with an accuracy rate of 71.4%. According to the results, SVM performs better when analyzing the sentiment of hashtag users on Twitter.
Downloads
References
A.-K. Al-Khowarizmi, A. R. Lubis, M. Lubis, and R. F. Rahmat, “Information technology based smart farming model development in agriculture land,” IAES Int. J. Artif. Intell., vol. 11, no. 2, p. 564, 2022.
R. A. K. N. Bintang, R. Umar, and U. Yudhana, “Perancangan perbandingan live forensics pada keamanan media sosial Instagram, Facebook dan Twitter di Windows 10,” Pros. SNST ke-9 Tahun 2018 Fak. Tek. Univ. Wahid Hasyim, pp. 125–128, 2018.
A. R. Royyan and E. B. Setiawan, “Feature Expansion Word2Vec for Sentiment Analysis of Public Policy in Twitter,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 6, no. 1, pp. 78–84, 2022.
S. Mann, J. Arora, M. Bhatia, R. Sharma, and R. Taragi, “Twitter sentiment analysis using enhanced bert,” in Intelligent Systems and Applications: Select Proceedings of ICISA 2022, Springer, 2023, pp. 263–271.
I. Zuhriyanto, A. Yudhana, and I. Riadi, “Perancangan Digital Forensik pada Aplikasi Twitter Menggunakan Metode Live Forensics,” Seminar Nasional Informatika 2008 (semnasIF 2008), vol. 2018, no. November. 2018.
I. F. Rozi, E. N. Hamdana, M. Balya, and I. Alfahmi, “Pengembangan Aplikasi Analisis Sentimen Twitter ( Studi Kasus SAMSAT Kota Malang ),” pp. 149–154, 2017.
Samsir, Ambiyar, U. Verawardina, F. Edi, and R. Watrianthos, “Analisis Sentimen Pembelajaran Daring Pada Twitter di Masa Pandemi COVID-19,” JURNAL MEDIA INFORMATIKA BUDIDARMAJURNAL MEDIA INFORMATIKA BUDIDARMA, vol. 5, no. 10, pp. 174–179, 2021, doi: 10.30865/mib.v4i4.2293.
S. Aslan, S. Kızıloluk, and E. Sert, “TSA-CNN-AOA: Twitter sentiment analysis using CNN optimized via arithmetic optimization algorithm,” Neural Comput. Appl., pp. 1–18, 2023.
G. A. Buntoro, “Analisis Sentimen Calon Gubernur DKI Jakarta 2017 Di Twitter,” Integer J. Maret, vol. 2, p. 1, 2017.
W. Setyobudi, A. Alwi, and I. P. Astuti, “Sentimen Analisis Twitter Terhadap Penyelenggaraan Gojek Traveloka Liga 1 Indonesia,” KOMPUTEK, 2018, doi: 10.24269/jkt.v2i1.68.
B. Liu, “Sentiment Analysis and Subjectivity in: Handbook of Natural Language Processing, Second Edition,” Handb. Nat. Lang. Process. Second Ed., 2010.
A. M. Zuhdi, E. Utami, and S. Raharjo, “Analisis Ssentiment Twitter Terhadap Capres Indonesia 2019 Dengan Metode K-NN,” SSRN Electron. J., vol. 5, pp. 1–7, 2019, doi: 10.2139/ssrn.3368718.
S. Ernawati and R. Wati, “Penerapan Algoritma K-Nearest Neighbors Pada Analisis Sentimen Review Agen Travel,” vol. VI, no. 1, 2018.
J. Ipmawati, Kusrini, and E. Taufiq Luthfi, “Komparasi Teknik Klasifikasi Teks Mining Pada Analisis Sentimen,” Indones. J. Netw. Secur., vol. 6, no. 1, pp. 28–36, 2017.
F. V. Sari and A. Wibowo, “Analisis Sentimen Pelanggan Toko Online JD.ID Menggunakan Metode Naive Bayes Classifier Berbasis Konversi Ikon Emosi,” vol. 10, pp. 681–686, 2019.
R. Vatambeti, S. V. Mantena, K. V. D. Kiran, M. Manohar, and C. Manjunath, “Twitter sentiment analysis on online food services based on elephant herd optimization with hybrid deep learning technique,” Cluster Comput., pp. 1–17, 2023.
R. Umar, I. Riadi, and D. A. Faroek, “Komparasi Image Matching Menggunakan Metode K-Nearest Neighbor ( KNN ) dan Metode Support Vector Machine ( SVM ),” J. Appl. Informatics Comput., vol. 4, no. 2, pp. 124–131, 2020.
M. Abdar, S. R. N. Kalhori, T. Sutikno, I. M. I. Subroto, and G. Arji, “Comparing Performance of Data Mining Algorithms in Prediction Heart Diseases.,” Int. J. Electr. Comput. Eng., vol. 5, no. 6, 2015.
B. A. C. Martani and E. B. Setiawan, “Naïve Bayes-Support Vector Machine Combined BERT to Classified Big Five Personality on Twitter,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 6, no. 6, pp. 1072–1078, 2022.
I. Syarif, A. Prugel-Bennett, and G. Wills, “SVM parameter optimization using grid search and genetic algorithm to improve classification performance,” TELKOMNIKA (Telecommunication Comput. Electron. Control., vol. 14, no. 4, pp. 1502–1509, 2016.
A. Amkor and N. El Barbri, “Classification of potatoes according to their cultivated field by SVM and KNN approaches using an electronic nose,” Bull. Electr. Eng. Informatics, vol. 12, no. 3, pp. 1471–1477, 2023.
M. B. S. Rahmatullah, A. L. S. Hanani, A. M. Naim, Z. Sari, and Y. Azhar, “Detection of Credit Card Fraud with Machine Learning Methods and Resampling Techniques,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 6, no. 6, pp. 923–929, 2022.
N. Hafidz and D. Y. Liliana, “Klasifikasi Sentimen pada Twitter Terhadap WHO Terkait Covid-19 Menggunakan SVM, N-Gram, PSO,” J. RESTI (Rekayasa Sist. Dan Teknol. Informasi), vol. 5, no. 2, pp. 213–219, 2021.
S. Ibrahim, N. A. Zulkifli, N. Sabri, A. A. Shari, and M. R. M. Noordin, “Rice grain classification using multi-class support vector machine (SVM),” IAES Int. J. Artif. Intell., vol. 8, no. 3, p. 215, 2019.
L. Priyambodo et al., “Klasifikasi Kematangan Tanaman Hidroponik Pakcoy Menggunakan Metode SVM,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 6, no. 1, pp. 153–160, 2022.
J. M. Arockiam and A. C. Seraphim Pushpanathan, “MapReduce-iterative support vector machine classifier: novel fraud detection systems in healthcare insurance industry.,” Int. J. Electr. Comput. Eng., vol. 13, no. 1, 2023.
R. R. Septiawan, B. H. Prakoso, and I. Kurniawan, “DPP IV Inhibitors Activities Prediction as An Anti-Diabetic Agent using Particle Swarm Optimization-Support Vector Machine Method,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 6, no. 6, pp. 974–980, 2022.
F. Shamrat et al., “Sentiment analysis on twitter tweets about COVID-19 vaccines using NLP and supervised KNN classification algorithm,” Indones. J. Electr. Eng. Comput. Sci., vol. 23, no. 1, pp. 463–470, 2021.
M. Z. Hossain, M. N. Akhtar, R. B. Ahmad, and M. Rahman, “A dynamic K-means clustering for data mining,” Indones. J. Electr. Eng. Comput. Sci., vol. 13, no. 2, pp. 521–526, 2019.
F. Rahmadayana and Y. Sibaroni, “Sentiment Analysis of Work from Home Activity using SVM with Randomized Search Optimization,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 5, no. 5, pp. 936–942, 2021.
L. Mardiana, D. Kusnandar, and N. Satyahadewi, “Analisis Diskriminan Dengan K Fold Cross Validation Untuk Klasifikasi Kualitas Air Di Kota Pontianak,” Bimaster Bul. Ilm. Mat. Stat. dan Ter., vol. 11, no. 1, pp. 97–102, 2022.
Copyright (c) 2023 Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi)
This work is licensed under a Creative Commons Attribution 4.0 International License.
Copyright in each article belongs to the author
- The author acknowledges that the RESTI Journal (System Engineering and Information Technology) is the first publisher to publish with a license Creative Commons Attribution 4.0 International License.
- Authors can enter writing separately, arrange the non-exclusive distribution of manuscripts that have been published in this journal into other versions (eg sent to the author's institutional repository, publication in a book, etc.), by acknowledging that the manuscript has been published for the first time in the RESTI (Rekayasa Sistem dan Teknologi Informasi) journal ;