Building of Informatics, Technology and Science
Vol 7 No 2 (2025): September 2025

Perbandingan Algoritma Naive Bayes, Random Forest, dan Support Vector Machine Terhadap Pandangan Masyarakat Mengenai Revisi Undang-Undang TNI di Instagram

Nasrul, Royhan (Unknown)
Yudhistira, Aditia (Unknown)



Article Info

Publish Date
30 Sep 2025

Abstract

The revision of the Indonesian National Army Law (TNI Law), enacted in 2025, sparked widespread controversy within society, particularly concerning issues of civilian supremacy and potential military dominance. With the growing use of social media as a platform for public expression, platforms such as Instagram have become the primary medium for the public to voice their opinions regarding this issue. This study aims to analyze public sentiment toward the revision of the TNI Law by utilizing text classification algorithms, namely Naive Bayes, Random Forest, and Support Vector Machine (SVM). Data was collected from 28,669 Instagram comments and analyzed through stages of data crawling, preprocessing, and labeling. To address data imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied. Subsequently, classification was performed using the three algorithms, with evaluation metrics including accuracy, precision, recall, and F1-score. The results after SMOTE demonstrated that the SVM algorithm delivered the best performance with an accuracy of (92%), followed by Random Forest at (88%), and Naive Bayes at (76%). Consequently, SVM was deemed the most effective in capturing patterns of public sentiment objectively. This research is expected to contribute to the advancement of digital public opinion studies and support the evaluation process of national defense policies

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