Eduvest - Journal of Universal Studies
Vol. 6 No. 3 (2026): Eduvest - Journal of Universal Studies

Comparison of F1-Score Naive Bayes, Logistic Regression, K-Nearest Neighbors, and SVM for Sentiment Classification X in Police Institutions

Hartanto Wijaya, Robertos (Unknown)



Article Info

Publish Date
30 Mar 2026

Abstract

Background: Social media, especially platform X, is the main channel for the public to express their opinions on public institutions, including the police. Analysis of public sentiment on this platform can provide insight into police performance. This study aims to compare the performance of machine learning algorithms in the classification of negative sentiment towards policing, focusing on unbalanced social media data. Objective: This study aims to compare the performance of machine learning algorithms—Naive Bayes, Logistic Regression, K-Nearest Neighbors (KNN), and Support Vector Machine (SVM)—in classifying negative sentiments towards policing on social media X, as well as overcoming data imbalances using the SMOTE method. Method: The dataset consisted of 1,274 Indonesian-language data collected by crawling, then processed using preprocessing techniques such as text cleaning, stopword removal, and TF-IDF feature extraction. Testing is conducted with and without the implementation of SMOTE for data balancing. Evaluate the model's performance using F1-Score. Result: Without SMOTE, all algorithms fail to recognize neutral classes. After the implementation of SMOTE, Logistic Regression showed the best performance with an F1-Score of 80.85%, followed by SVM, Naive Bayes, and KNN. The implementation of SMOTE significantly improves the model's ability to classify negative sentiments. Conclusion: The combination of Logistic Regression and SMOTE is the best approach to classifying public sentiment towards policing, which can help police agencies understand public sentiment more accurately.

Copyrights © 2026






Journal Info

Abbrev

edv

Publisher

Subject

Aerospace Engineering Computer Science & IT Health Professions Neuroscience Social Sciences

Description

Eduvest - Journal of Universal Studies is a double blind peer-reviewed academic journal and open access to multidiciplinary fields. The journal is published monthly by Green Publisher Indonesia. Eduvest - Journal of Universal Studies provides a means for sustained discussion of relevant issues that ...