Comparison of Naive Bayes and SVM in Public Opinion Sentiment Analysis on Platform X - Salma Ngarifatul Khofiyah; Pungkas Subarkah (Fakultas Teknik Universitas Lambung Mangkurat, 2025)
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.