Analisis Sentimen Isu Artificial Intelligence di Twitter dengan SVM dan Random Forest

Authors

  • Abriel Navidkya
  • Mohamad Yusuf Universitas Mercu Buana

DOI:

https://doi.org/10.37859/jf.v16i1.10037
Keywords: artificial intelligence, sentiment analysis, support vector machine, random forest, twitter

Abstract

Artificial Intelligence (AI) has become a widely discussed topic on social media, particularly Twitter, as public opinions about this technology grow. This study aims to analyze the sentiment of Twitter posts related to AI issues using two classification algorithms: Support Vector Machine (SVM) and Random Forest (RF). The research method involves data collection via the Twitter API, followed by text preprocessing steps including case folding, tokenization, stopword removal, and stemming. The data is then manually or semi-automatically labeled with sentiments (positive, negative, neutral) to support supervised learning. Vectorization using TF-IDF is applied before training and testing the SVM and RF models to compare their classification performance. Results indicate that SVM outperforms RF in accuracy and class balance across sentiments. The application of Synthetic Minority Oversampling Technique (SMOTE) enhances performance, especially in detecting the less frequent negative sentiment. Post-SMOTE, SVM achieves an accuracy of 89.12% and an F1-score of 0.7122 for the negative class, demonstrating its ability to handle data imbalance. Although RF also improves after SMOTE, its performance remains below SVM. This study is expected to contribute significantly to public opinion monitoring and serve as a foundation for decision-making regarding AI-based technology development. 

Downloads

Download data is not yet available.

References

I. A. Putri et al., “ANALISIS SENTIMEN PERAN ARTIFICIAL INTELLIGENCE TERHADAP,” vol. 9, no. 3, pp. 4909–4916, 2025.

R. Wijanarko, D. E. Ratnawati, and P. P. Adikara, “Analisis Sentimen Dampak Perkembangan Artificial Intelligence (AI) pada Media Sosial X/Twitter Menggunakan Metode Random Forest,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 1, no. 1, pp. 2548–964, 2017, [Online]. Available: http://j-ptiik.ub.ac.id

S. A. Putra and A. Wijaya, “Analisis Sentimen Artificial Intelligence (Ai) Pada Media Sosial Twitter Menggunakan Metode Lexicon Based,” JuSiTik J. Sist. dan Teknol. Inf. Komun., vol. 7, no. 1, pp. 21–28, 2023, doi: 10.32524/jusitik.v7i1.1042.

M.S. Afiyati and M. Samantri, “Perbandingan Algoritma Support Vector Machine dan Random Forest untuk Analisis Sentimen Terhadap Kebijakan Pemerintah Indonesia Terkait Kenaikan Harga BBM Tahun 2022,” Jurnal JTIK(Jurnal Teknologi Informasi dan Komunikasi)., vol. 8, no. 1, pp. 1–9, 2024, doi: 10.35870/jtik.v8i1.1202.

P. Yang, S. Untuk, and P. Mahasiswa, “Pemanfaatan Kecerdasan Buatan Pada Algoritma K-Means Klastering Dan Sentiment Analysis Terhadap Strategi Promosi Yang Sukses Untuk Penerimaan Mahasiswa Baru,” J. Sist. Inf. Univ. Suryadarma, vol. 11, no. 1, pp. 1–6, 2014, doi: 10.35968/jsi.v11i1.1120.

Y. Akbar and T. Sugiharto, “Analisis Sentimen Pengguna Twitter di Indonesia Terhadap ChatGPT Menggunakan Algoritma C4.5 dan Naïve Bayes (Yuma Akbar 1*, Tri Sugiharto 2 ) Analisis Sentimen Pengguna Twitter di Indonesia Terhadap ChatGPT Menggunakan Algoritma C4.5 dan Naïve Bayes,” J. Sains dan Teknol., vol. 5, no. 1, pp. 115–122, 2023, [Online]. Available: https://doi.org/10.55338/saintek.v4i3.1368

A. Cahya Kamilla, N. Priyani, R. Priskila, and V. Handrianus Pranatawijaya, “Analisis Sentimen Film Agak Laen Dengan Kecerdasan Buatan: Text Mining Metode Naïve Bayes Classifier,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 3, pp. 2923–2928, 2024, doi: 10.36040/jati.v8i3.9587.

Y. Jumaryadi, R. Meiyanti, R. Fajriah, and A. N. Mahsyar, “Implementasi Algoritma Random Forest Untuk Analisis Sentimen Ulasan Pengguna Aplikasi Merdeka Mengajar,” Bulletin of Computer Science Research., vol. 5, no. 4, pp. 1–10, 2025, doi: 10.47065/bulletincsr.v5i4.530.

V. No, I. K. Najibulloh, D. Intan, and S. Saputra, “Edumatic : Jurnal Pendidikan Informatika Analisis Sentimen Ulasan Co-Pilot Google Play dengan SVM , Neural Network , dan Decision Tree,” vol. 9, no. 1, pp. 275–283, 2025, doi: 10.29408/edumatic.v9i1.29673.

P. H. Febryan, A. K. Negara, M. Farell, A. Ramadhan, and S. Informasi, “ANALISIS PENGGUNAAN AI DALAM ALGORITMA SOSIAL MEDIA :,” vol. 9, no. 1, pp. 1095–1102, 2025.

R. Mubarak, S. Maesaroh, M. Yusuf, K. Budiana, and M. R. Fahreza “Visualisasi Prediksi Prevalensi Balita Menggunakan Algoritma Random Forest Pada Lembaga Bidang Pangan,” Journal CERITA:Creative Education of Research in Information Technology and Artificial Informatics., vol. 10, no. 2, pp. 164–171, Aug. 2024, doi:10.33050/cerita.v10i2.3176.

L. Tan, O. K. Tan, C. C. Sze, and W. W. Bin Goh, “Emotional Variance Analysis: A new sentiment analysis feature set for Artificial Intelligence and Machine Learning applications,” PLoS One, vol. 18, no. 1 January, pp. 1–22, 2023, doi: 10.1371/journal.pone.0274299.

T. H. J. Hidayat, Y. Ruldeviyani, A. R. Aditama, G. R. Madya, A. W. Nugraha, and M. W. Adisaputra, “Sentiment analysis of twitter data related to Rinca Island development using Doc2Vec and SVM and logistic regression as classifier,” Procedia Comput. Sci., vol. 197, no. 2021, pp. 660–667, 2021, doi: 10.1016/j.procs.2021.12.187.

F. Iqbal et al., “A Hybrid Framework for Sentiment Analysis Using Genetic Algorithm Based Feature Reduction,” IEEE Access, vol. 7, pp. 14637–14652, 2019, doi: 10.1109/ACCESS.2019.2892852.

Y. Kirelli and S. Arslankaya, “Sentiment Analysis of Shared Tweets on Global Warming on Twitter with Data Mining Methods: A Case Study on Turkish Language,” Comput. Intell. Neurosci., vol. 2020, 2020, doi: 10.1155/2020/1904172.

H. Wisnu, M. Afif, and Y. Ruldevyani, “Sentiment analysis on customer satisfaction of digital payment in Indonesia: A comparative study using KNN and Naïve Bayes,” J. Phys. Conf. Ser., vol. 1444, no. 1, 2020, doi: 10.1088/1742-6596/1444/1/012034.

D. Pratmanto, R. Rousyati, F. F. Wati, A. E. Widodo, S. Suleman, and R. Wijianto, “App Review Sentiment Analysis Shopee Application in Google Play Store Using Naive Bayes Algorithm,” J. Phys. Conf. Ser., vol. 1641, no. 1, 2020, doi: 10.1088/1742-6596/1641/1/012043.

L. Kurniasari and A. Setyanto, “Sentiment Analysis using Recurrent Neural Network,” J. Phys. Conf. Ser., vol. 1471, no. 1, 2020, doi: 10.1088/1742-6596/1471/1/012018.

R. Novendri, A. S. Callista, D. N. Pratama, and C. E. Puspita, “Sentiment Analysis of YouTube Movie Trailer Comments Using Naïve Bayes,” Bull. Comput. Sci. Electr. Eng., vol. 1, no. 1, pp. 26–32, 2020, doi: 10.25008/bcsee.v1i1.5.

S. Styawati, A. R. Isnain, N. Hendrastuty, and L. Andraini, “Comparison of Support Vector Machine and Naïve Bayes on Twitter Data Sentiment Analysis,” J. Inform. J. Pengemb. IT, vol. 6, no. 1, pp. 56–60, 2021, doi: 10.30591/jpit.v6i1.3245.

Downloads

Published

2026-05-10