Building of Informatics, Technology and Science
Vol 8 No 1 (2026): June 2026

Comparing TF-IDF Based SVM and Logistic Regression for Imbalanced Pertamina Corruption Tweet Sentiment Classification

Khahlil Gibran (Universitas Islam Negeri Walisongo, Semarang)
Wenty Dwi Yuniarti (Universitas Islam Negeri Walisongo, Semarang)
Khotibul Umam (Universitas Islam Negeri Walisongo, Semarang)
Mokhamad Iklil Mustofa (Universitas Islam Negeri Walisongo, Semarang)



Article Info

Publish Date
05 Jun 2026

Abstract

The corruption case involving PT Pertamina (Persero) in early 2025 generated widespread public reactions on social media, particularly on the X (Twitter) platform. The rapid dissemination of opinions in digital environments highlights the importance of analyzing public sentiment toward socio-political issues. This study aims to examine public sentiment regarding the Pertamina corruption case using a text classification approach based on Term Frequency–Inverse Document Frequency (TF-IDF). This study contributes a controlled comparison of TF-IDF-based Support Vector Machine (SVM) and Logistic Regression on imbalanced Indonesian-language tweets related to a nationally salient corruption issue, while also emphasizing the importance of evaluating performance beyond accuracy alone through macro-F1 and minority-class recall. Two classification algorithms, Support Vector Machine (SVM) and Logistic Regression, were employed to compare their performance in predicting lexicon-derived positive and negative sentiment labels.. To address class imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied to the training data. A total of 3,058 Indonesian-language tweets collected between February 25 and March 10, 2025 underwent preprocessing and sentiment labeling using the INSET Lexicon. The results show that SVM achieved higher overall accuracy of 94.93% and a macro-F1 score of 0.80, while Logistic Regression achieved an accuracy of 90.52% and a macro-F1 score of 0.73. However, class-wise evaluation indicates that accuracy should not be interpreted independently because the dataset was dominated by negative sentiment. For the positive minority class, SVM obtained an F1-score of 0.64 and recall of 0.60, whereas Logistic Regression obtained a lower F1-score of 0.52 but a higher recall of 0.69. These findings indicate a trade-off between overall classification performance and minority-class sensitivity.

Copyrights © 2026






Journal Info

Abbrev

bits

Publisher

Subject

Computer Science & IT

Description

Building of Informatics, Technology and Science (BITS) is an open access media in publishing scientific articles that contain the results of research in information technology and computers. Paper that enters this journal will be checked for plagiarism and peer-rewiew first to maintain its quality. ...