Sentiment Analysis of Public Figures on X Using Naïve Bayes and SVM - Muhammad Hashfiudin Tridharma Putra; Aries Dwi Indriyanti (Universitas Negeri Surabaya, 2026)
The rapid growth of social media has created an open public space where users freely express opinions toward public figures, generating positive, negative, and neutral sentiments. Platform X [Formerly Twitter] is one of the most widely used media for public discourse in Indonesia. This study analyzes public sentiment toward the Regent of Sidoarjo for the 2021–2024 period, Ahmad Muhdlor Ali, using sentiment classification techniques. The research applies two machine learning algorithms, namely the Naïve Bayes Classifier (NBC) and Support Vector Machine (SVM), to identify and compare their performance in sentiment analysis. Data were collected through web scraping using relevant keywords and processed in Google Colab. A quantitative research approach was employed using the SEMMA framework, which consists of Sample, Explore, Modify, Model, and Assess stages. The process included data cleaning, text preprocessing, sentiment labeling, and classification using both algorithms. Model performance was evaluated using accuracy, precision, and recall metrics. The results show that both NBC and SVM perform well in classifying public sentiment, achieving high accuracy levels. However, differences in performance were observed between the two methods, indicating that algorithm selection influences classification outcomes. This study contributes to the evaluation of public perception toward government officials and provides a reference for the development of sentiment analysis systems based on social media data.