JTIULM (Jurnal Teknologi Informasi Universitas Lambung Mangkurat)
Vol. 10 No. 2 (2025)

Comparison of Naive Bayes and SVM in Public Opinion Sentiment Analysis on Platform X

Salma Ngarifatul Khofiyah (Universitas Amikom Purwokerto)
Pungkas Subarkah (Universitas Amikom Purwokerto)



Article Info

Publish Date
31 Oct 2025

Abstract

The growth of social media has made it the primary means for the general public to express their opinions, including on political and legal issues in Indonesia. One topic that has been widely discussed is the abolition of Tom Lembong and the amnesty granted to Hasto Kristiyanto by President Prabowo Subianto, which has garnered mixed public reactions on the X platform. The purpose of this study is to analyze public sentiment regarding current issues and compare the performance of two machine learning algorithms, Naïve Bayes and Support Vector Machine (SVM), to classify public opinion. Data was obtained through a crawling process of 3,003 tweets, followed by a preprocessing stage that included cleaning, case folding, slang normalization, tokenizing, stopword removal, and stemming. Next, a suitability analysis using the TF-IDF method was conducted before the data was processed by the two algorithms. The results showed that, of the 2,998 valid tweets, 78.6% of public opinion was negative and only 21.4% was positive, indicating a predominance of criticism of the issues discussed. When comparing the algorithms, SVM provided more accurate results with an accuracy rate of 78.66%, while Naïve Bayes only achieved 58%. This shows that SVM is more flexible in analyzing text data with a high level of complexity compared to Naïve Bayes.

Copyrights © 2025






Journal Info

Abbrev

jtiulm

Publisher

Subject

Computer Science & IT Electrical & Electronics Engineering Engineering

Description

Jurnal Teknologi Informasi Universitas Lambung Mangkurat (JTIULM) is intended as a media for scientific studies on the results of research, thinking and analytical-critical studies regarding research in Systems Engineering, Informatics / Information Technology, Information Management and Information ...