Journal of Applied Informatics and Computing (Nov 2024)
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.
Keywords