Comparison of Naïve Bayes Classifier and Decision Tree Algorithms for Sentiment Analysis on the House of Representatives' Right of Inquiry on Twitter
Abstract
This research analyzes public sentiment towards the topic of the House of Representatives' Right of Inquiry on Twitter using Naïve Bayes Classifier and Decision Tree algorithms. The goal is to compare the effectiveness of the two algorithms in political sentiment analysis. . The research methodology includes data collection from Twitter, data pre-processing, sentiment classification, and result analysis. Sentiment analysis reveals the dominance of positive sentiment related to the DPR's Right of Inquiry. However, this study has limitations in terms of dataset size and depth of text-based sentiment analysis. This research contributes to a better understanding of public sentiment towards political issues in Indonesia and highlights the importance of proper algorithm selection in social media sentiment analysis. Development suggestions include exploration of deep learning techniques, integration of multimodal analysis, data balancing (oversampling or undersampling) and improvement of pre-processing so that the model is better able to capture negative contexts. The results of the study showed excellent performance of both Naive Bayes Classifier and Decision Tree algorithms with accuracy above 95%. Decision Tree excels with an accuracy of 99%, while Naïve Bayes Classifier performs better with an accuracy of 96%. The results with the Confusion Matrix test are precision 0.98, recall 1.00, and F1-Score 0.99.
Downloads
References
J. Magister et al., “Nommensen Journal of Legal Opinion (NJLO) Implementasi Hak Angket Dewan Perwakilan Rakyat Dalam Melakukan Kontrol Atas Kebijakan Pemerintah”, [Online]. Available: http://ejournal.uhn.ac.id/index.php/opinion
S. Ayudya, A. Armand, M. Hafid, and M. R. Muttaqin, “Analisis Sentimen Sistem E-Tilang Pada Platform Twitter Menggunakan Metode Naive Bayes,” 2023.
M. Hudha, E. Supriyati, and T. Listyorini, “Analisis Sentimen Pengguna Youtube Terhadap Tayangan #Matanajwamenantiterawan Dengan Metode Naïve Bayes Classifier,” Jurnal Informatika dan Komputer) Akreditasi KEMENRISTEKDIKTI, vol. 5, no. 1, pp. 2614–8897, 2022, doi: 10.33387/jiko.
P. Paramita and A. Ibrahim, “Analisis Sentimen Terhadap Pengguna Qris (Quick Respond Code Indonesian Standart) Pada Twitter Menggunakan Metode Naïve Bayes Classifier,” JOISIE Journal Of Information System And Informatics Engineering, vol. 7, no. 1, pp. 1–6, 2023, [Online]. Available: https://t.co/lJemg7TbKb
F. Septarian and A. Nugroho, “3 rd Seminar Nasional Mahasiswa Fakultas Teknologi Informasi (SENAFTI) 30 Agustus 2023-Jakarta,” 2023.
A. Rozaq, Y. Yunitasari, K. Sussolaikah, E. R. N. Sari, and R. I. Syahputra, “Analisis Sentimen Terhadap Implementasi Program Merdeka Belajar Kampus Merdeka Menggunakan Naïve Bayes, K-Nearest Neighboars Dan Decision Tree,” Jurnal Media Informatika Budidarma, vol. 6, no. 2, p. 746, Apr. 2022, doi: 10.30865/mib.v6i2.3554.
D. Atika, A. Ari Aldino, S. Informasi, J. Pagar Alam No, L. Ratu, and K. Kedaton, “Term Frequency-Inverse Document Frequency Support Vector Machine Untuk Analisis Sentimen Opini Masyarakat Terhadap Tekanan Mental Pada Media Sosial Twitter,” 2022. [Online]. Available: http://jim.teknokrat.ac.id/index.php/JTSI
R. Aulianita, L. A. Utami, N. Musyaffa, G. Wijaya, A. Mukhayaroh, and A. Yoraeni, “Sentiment Analysis Review of Smartphones with Artificial Intelligent Camera Technology Using Naive Bayes and n-gram Character Selection,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Nov. 2020. doi: 10.1088/1742-6596/1641/1/012076.
A. M. Priyatno and F. I. Firmananda, “N-Gram Feature for Comparison of Machine Learning Methods on Sentiment in Financial News Headlines,” RIGGS: Journal of Artificial Intelligence and Digital Business, vol. 1, no. 1, pp. 01–06, Jul. 2022, doi: 10.31004/riggs.v1i1.4.
M. Agus, P. Subali, and C. Fatichah, “Kombinasi Metode Rule-Based Dan N-Gram Stemming Untuk Mengenali Stemmer Bahasa Bali A Combination Of Methods Rule-Based And N-Gram Stemming To Recognize Balinese Language Stemmer,” vol. 6, no. 2, pp. 219–228, 2019, doi: 10.25126/jtiik.201961105.
S. Abdullah, “Penulis Pertama: Visualisasi Data Analisa Sentimen … 261 Visualisasi Data Analisa Sentimen RUU Omnibus law Kesehatan Menggunakan KNN dengan Software RapidMiner,” vol. 8, no. 3, 2023.
T. Arlovin, “Analisis Sentimen Review Pengguna Aplikasi Fizzo Novel Di Google Play Menggunakan Algoritma Naive Bayes,” 2024.
E. H. Muktafin, K. Kusrini, and E. T. Luthfi, “Analisis Sentimen pada Ulasan Pembelian Produk di Marketplace Shopee Menggunakan Pendekatan Natural Language Processing,” Jurnal Eksplora Informatika, vol. 10, no. 1, pp. 32–42, Sep. 2020, doi: 10.30864/eksplora.v10i1.390.
Hootsuite (We are Social): Indonesian Digital Report 2021. (2021). Accessed: March. 05, 2024. Retrieved from Andi.Link: https://andi.link/hootsuite-we-are-social-indonesian-digitalreport-2021/
D. Vonega, A. Fadila, and D. Kurniawan, “Analisis Sentimen Twitter Terhadap Opini Publik Atas Isu Pencalonan Puan Maharani dalam PILPRES 2024”, JAIC, vol. 6, no. 2, pp. 129-135, Nov. 2022.
J. Friadi, and D. E. Kurniawan, "Analisis Sentimen Ulasan Wisatawan Terhadap Alun-Alun Kota Batam: Perbandingan Kinerja Metode Naive Bayes dan Support Vector Machine," Jurnal Sistem Informasi Bisnis, vol. 14, no. 4, pp. 403-407, Oct. 2024. https://doi.org/10.21456/vol14iss4pp403-407
Liu, B. (2012). Sentiment Analysis and Opinion Mining. Chicago: Morgan & Claypool Publisher
Copyright (c) 2024 Putri Wahyuni, Moh. Ali Romli
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).