Building of Informatics, Technology and Science
Vol 7 No 1 (2025): June (2025)

Perbandingan Algoritma NBC, SVM, Logistic Regression untuk Analisis Sentimen Terhadap Wacana KaburAjaDulu di Media Sosial X

Rohman, Adib Annur (Unknown)
Trisnapradika, Gustina Alfa (Unknown)



Article Info

Publish Date
01 Jun 2025

Abstract

This research aims to analyze sentiment towards KaburAjaDulu discourse on X social media by utilizing Logistic Regression, Support Vector Machine (SVM), and Naive Bayes algorithms. Data was collected through a crawling process and resulted in 3,011 tweet data. Pre-processing stages include data cleaning, conversion of letters to lowercase, normalization, tokenization, stopword removal, and stemming. After preprocessing, the data was divided into two sentiment categories, namely positive and negative using a lexicon approach. The dataset is divided using an 80:20 scheme for training and test data, with feature representation utilizing the TF-IDF method. The modeling process is performed utilizing the three algorithms to be evaluated using accuracy, precision, recall, and f1-score metrics. As a solution to class inequality, the oversampling technique SMOTE (Synthetic Minority Over-sampling Technique) is applied. Based on the evaluation, it shows that before the application of SMOTE, Naive Bayes algorithm obtained 78.18% accuracy, 81.80% precision, 77.06% recall, and 77.35% f1-score; SVM obtained 85.63% accuracy, 86.49% precision, 85.68% recall, and 85.94% f1-score; while Logistic Regression obtained 83.05% accuracy, 85.31% precision, 82.47% recall, and 82.95% f1-score. After applying SMOTE, Naive Bayes improved to 81.90% accuracy, 82.27% precision, 81.67% recall, and 81.87% f1-score; SVM obtained 85.63% accuracy, 87.59% precision, 86.89% recall, and 87.13% f1-score; and Logistic Regression obtained 83.33% accuracy, 84.46% precision, 83.62% recall, and 83.88% f1-score. These findings prove that SVM has the most consistent and superior sentiment classification performance on this dataset, making an important contribution to the development of methods for analyzing people's views on social media platforms.

Copyrights © 2025






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. ...