Indonesia Analisis Sentimen Publik terhadap Purbaya Yudhi Sadewa di X menggunakan Metode Naive Bayes

Rian Nurdiana, Alam RahmatullohNon-Scopus17 Juni 2026Afiliasi: ID

Abstrak

The rapid growth of the social media platform X (Twitter) has made it an essential medium for observing how the public responds to influential figures and economic policy issues. This study investigates public sentiment toward Purbaya Yudhi Sadewa by applying the Naive Bayes Classifier to tweet data collected from X. A total of 500 tweets containing the keyword “Purbaya Yudhi Sadewa” were gathered through API crawling between January and November 2025, and 451 tweets were retained after filtering irrelevant and duplicate entries. The workflow of this research consists of text preprocessing steps—such as case folding, tokenization, stopword removal, and stemming—followed by TF-IDF–based feature extraction, model training using Naive Bayes, and performance evaluation. The classifier produced an accuracy of 91.1%, with precision and recall values of 0.92 and 0.97 for negative sentiment, and 0.60 and 0.33 for positive sentiment. Further analysis showed that negative opinions dominated the dataset (427 tweets), while positive sentiments appeared far less frequently (32 tweets), primarily criticizing economic performance, inflation, and the stability of the rupiah. These findings highlight the capability of the Naive Bayes algorithm in effectively categorizing sentiment toward economic figures in Indonesian-language social media content.

Identifier

Scroll to Top