Implementation of the Naive Bayes Algorithm for Public Sentiment Analysis Toward Power Plant Development - Rasyid, Vithan; Ruuhwan (Smart Techno (Smart Technology, Informatics and Technopreneurship), 2026)
This study aims to analyze public sentiment toward power plant development using data collected from the social media platform Twitter. The dataset consisted of 2,493 tweets obtained through a crawling process using keywords related to power plant development, such as “PLTS” and “PLTS Cirata.” The preprocessing stage included cleaning, case folding, stopword removal, tokenization, and stemming using the Sastrawi library to produce more structured textual data. The dataset was then divided into a training set comprising 85% of the data (2,120 tweets) and a testing set comprising 15% (373 tweets). The classification process was performed using the Multinomial Naive Bayes algorithm, as this method is well suited for text data represented by word-frequency features extracted through CountVectorizer. Model evaluation was conducted using a confusion matrix with accuracy, precision, recall, and F1-score as performance metrics. The results showed that the model achieved an accuracy of 75%, indicating that the Multinomial Naive Bayes method is reasonably effective for text-based sentiment classification. Furthermore, the findings revealed that public opinion regarding power plant development is influenced by perceptions of renewable energy benefits, environmental impacts, and government policies.