This research explores sentiment analysis within the context of the 2024 Presidential Election, utilizing tweet data to understand public opinion dynamics. The study employs the Naive Bayes classification algorithm combined with Term Frequency-Inverse Document Frequency (TF-IDF) techniques to categorize sentiments into diverse emotional spectrums. During the training phase, the model achieved a high accuracy of 98.3%. However, when applied to real-world data, the accuracy dropped to 80.8%, highlighting the challenges of adapting to unpredictable and heterogeneous data. The evaluation showed the model's effectiveness in recognizing positive sentiments in training data, but a decrease in performance during testing. This underscores the need for dynamic training approaches to handle real-world applications. The study demonstrates that TF-IDF significantly enhances the Naive Bayes classifier's accuracy and that tweet data on the 2024 Presidential Election predominantly exhibit positive sentiments. However, these findings require cautious interpretation due to the complexities of natural language and potential cultural biases in automated sentiment analysis. The research suggests addressing overfitting, diversifying the training corpus, and adopting more sophisticated algorithms to better capture nuanced sentiments. This study lays the groundwork for future research in understanding public opinion during election cycles.
Copyrights © 2024