Development of Machine Learning Model for Sentiment Analysis: A Case Study of Indonesia Presidential Candidates 2024 Rizqia Lestika Atimi (a*), Refid Ruhibnur (b), Indra Pratiwi (c)
a, b, c) Departement of Information Technology
Politeknik Negeri Ketapang
Abstract
In the modern political era, sentiment analysis can be utilized by politicians to assess the level of public support and opposition. During the 2024 Presidential and Vice-Presidential Debate period, the names of the presidential and vice-presidential candidates have increasingly become a topic of discussion among the Indonesian public, especially on social media. The large number of active users on the social media platform X in Indonesia, reaching 27.5 million as of July 2023, has a significant impact on the volume of tweets generated. Consequently, this platform can be utilized to gain insights into public sentiment regarding the preferred candidates for Indonesia^s 2024 presidential election. Therefore, an approach is needed to understand, extract, and process tweet data to identify and obtain information about the sentiments contained within it. Sentiment analysis can be an effective and efficient analytical approach to identify and classify public sentiment. This research develops a sentiment analysis model using a machine learning algorithm approach. The Naive Bayes machine learning algorithm is implemented to classify public sentiment into positive and negative categories. The stages carried out in the development of a sentiment analysis model include text preprocessing, labelling, weighting, machine learning algorithm implementation, and model evaluation. The model evaluation using confusion matrix shows that the developed sentiment analysis model can classify sentiment into two classes of positive and negative sentiment with a model performance accuration value of 72.44%. From the results of model implementation, it is known that during the 2024 presidential and vice-presidential candidate debate, the presidential candidate who received the most positive sentiment from the public was the Prabowo Subianto-Gibran Rakabuming Raka and the most negative sentiment from the public was the Anies Baswedan-Muhaimin Iskandar.