Sentiment Classification of MyPertamina Reviews Using Naïve Bayes and Logistic Regression - Dwi Yuni Saraswati; Handayani, Maya Rini; Umam, Khothibul; Mustofa, Mokhamad Iklil (Politeknik Negeri Batam, 2025)
This research conducts a comparative evaluation of the effectiveness of the Naïve Bayes and Logistic Regression algorithms in mapping public perceptions of the MyPertamina application on the Google Play Store. The data consists of 2,000 user reviews obtained through a scraping technique. The research steps include labeling the reviews as positive or negative, followed by pre-processing and TF-IDF weighting. The dataset was systematically divided into two parts, with 80% allocated for model training and the remaining 20% for evaluation. The Naïve Bayes and Logistic Regression models were implemented using the Python programming language and evaluated based on accuracy, precision, recall, and F1-score metrics. The analysis shows that Logistic Regression achieved an accuracy of 86%, while Naïve Bayes achieved 81%. Logistic Regression demonstrated superior performance as it effectively captures linear relationships between features in TF-IDF representations and provides a more balanced outcome in terms of precision and recall. In contrast, Naïve Bayes is more influenced by high-frequency word distributions and does not account for feature correlations, which can limit its performance in certain contexts. Therefore, Logistic Regression is considered more suitable for sentiment classification tasks in this study. These findings emphasize the importance of selecting appropriate algorithms for sentiment analysis and suggest opportunities for future research using alternative methods to enhance predictive accuracy.