Comparison of Naïve Bayes Classifier and Decision Tree Algorithms for Sentiment Analysis on the House of Representatives' Right of Inquiry on Twitter

  • Putri Wahyuni Universitas Teknologi Yogyakarta
  • Moh. Ali Romli Universitas Teknologi Yogyakarta

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.

References

[1] 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
[2] S. Ayudya, A. Armand, M. Hafid, and M. R. Muttaqin, “Analisis Sentimen Sistem E-Tilang Pada Platform Twitter Menggunakan Metode Naive Bayes,” 2023.
[3] 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.
[4] 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
[5] F. Septarian and A. Nugroho, “3 rd Seminar Nasional Mahasiswa Fakultas Teknologi Informasi (SENAFTI) 30 Agustus 2023-Jakarta,” 2023.
[6] 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.
[7] 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
[8] 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.
[9] 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.
[10] 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.
[11] 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.
[12] T. Arlovin, “Analisis Sentimen Review Pengguna Aplikasi Fizzo Novel Di Google Play Menggunakan Algoritma Naive Bayes,” 2024.
[13] 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.
[14] 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/
[15] 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.
[16] 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
[17] Liu, B. (2012). Sentiment Analysis and Opinion Mining. Chicago: Morgan & Claypool Publisher
Published
2024-11-20
How to Cite
WAHYUNI, Putri; ROMLI, Moh. Ali. Comparison of Naïve Bayes Classifier and Decision Tree Algorithms for Sentiment Analysis on the House of Representatives' Right of Inquiry on Twitter. JOURNAL OF APPLIED INFORMATICS AND COMPUTING, [S.l.], v. 8, n. 2, p. 523-530, nov. 2024. ISSN 2548-6861. Available at: <http://704209.wb34atkl.asia/index.php/JAIC/article/view/8670>. Date accessed: 28 nov. 2024. doi: https://doi.org/10.30871/jaic.v8i2.8670.
Section
Articles

Most read articles by the same author(s)

Obs.: This plugin requires at least one statistics/report plugin to be enabled. If your statistics plugins provide more than one metric then please also select a main metric on the admin's site settings page and/or on the journal manager's settings pages.