Analisis Kinerja Algoritma SVM dan Naïve Bayes untuk Klasifikasi Sentimen Program Makan Gratis
Abstract
The development of social media facilitates the massive dissemination of public opinion, including towards the government’s free meal program. The high volume of comments makes manual analysis inefficient, thus requiring technological approaches such as sentiment analysis for automatic opinion classification. This study focuses on comparing the performance of the SVM (Support Vector Machine) and Naïve Bayes algorithms in classifying public sentiment collected from X social media data. The research method includes data crawling, preprocessing with Natural Language Processing (NLP), and classification using both algorithms. Testing results on an imbalanced dataset show that SVM is the best model with 96% accuracy and an F1-score of 0.48 for the minority (negative) class, significantly outperforming Naïve Bayes variants which tend to predict the majority class. The findings demonstrate that the SVM algorithm has higher reliability in sentiment classification on datasets with imbalanced class distribution.
Keywords: Sentiment Analysis; Support Vector Machines; Naive Bayes; Free Lunch Program; Text Classification
Abstrak
Perkembangan media sosial memfasilitasi penyampaian opini publik secara masif, termasuk terhadap program makan gratis pemerintah. Volume komentar yang tinggi menjadikan analisis manual tidak efisien, sehingga memerlukan pendekatan teknologi seperti analisis sentimen untuk klasifikasi opini otomatis. Penelitian ini berfokus pada perbandingan performa algoritma SVM (Support Vector Machine) dan Naïve Bayes dalam mengklasifikasikan sentimen masyarakat yang diambil dari data media sosial X. Metode penelitian mencakup pengumpulan data crawling, pra-pemrosesan dengan Natural Language Processing (NLP), hingga klasifikasi menggunakan kedua algoritma. Hasil pengujian pada dataset yang tidak seimbang menunjukkan bahwa SVM merupakan model terbaik dengan akurasi 96% dan nilai F1-score 0.48 pada kelas minoritas (negatif), secara signifikan mengungguli varian Algoritma Naïve Bayes sering kali lebih condong memprediksi pada kelas mayoritas. Hasil penelitian ini membuktikan bahwa algoritma SVM memiliki keandalan lebih tinggi dalam klasifikasi sentimen pada dataset dengan distribusi kelas yang tidak seimbang.
Keywords
References
P. K. Sari and R.R. Suryono, “Komparasi Algoritma Support Vector Machine Dan Random Forest Untuk Analisis Sentimen Metaverse,” J. Mnemon., vol. 7, no. 1, pp. 31–39, Feb. 2024.
B. A. Maulana, M. J. Fahmi, A. M. Imran, and N. Hidayati, “Analisis Sentimen Terhadap Aplikasi Pluang Menggunakan Algoritma Naive Bayes dan Support Vector Machine (SVM),” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 2, pp. 375–384, Feb. 2024, doi: 10.57152/malcom.v4i2.1206.
A. Zidna, M. Ali, M. Sri, and S. Joko Dwi, “Penerapan Metode Support Vector Machine Untuk Analisis Sentimen Pengguna Twitter,” J. Inf. Syst. Manag., vol. 3, no. 1, pp. 16–21, 2021.
E. Febriyani and H. Februariyanti, “Analisis Sentimen Terhadap Program Kampus Merdeka Menggunakan Algoritma Naive Bayes Classifier Di Twitter,” J. Tekno Kompak, vol. 17, no. 1, p. 25, 2023, doi: 10.33365/jtk.v17i1.2061.
B. A. Maulana, M. J. Fahmi, A. M. Imran, and N. Hidayati, “Sentiment Analysis of Pluang Applications With Naive Bayes and Support Vector Machine ( SVM ),” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 2, pp. 375–384, 2024.
W. Ningsih, B. Alfianda, R. Rahmaddeni, and D. Wulandari, “Comparison of Naive Bayes and SVM Algorithms in Twitter Sentiment Analysis on Electric Car Use in Indonesia,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 2, pp. 556–562, 2024.
F. M. Sarimole and W. Septian, “Analisis Sentimen Masyarakat Terhadap Isu Penundaan Pemilu 2024 Pada Twitter Dengan Metode Naive Bayes Dan Support Vector Machine,” J. Sains dan Teknol., vol. 5, no. 3, pp. 890–899, 2024, [Online]. Available: http://ejournal.sisfokomtek.org/index.php/saintek/article/view/1359
M. E. Apriyani, A. Fikri Nur, and E. S. Astuti, “Comparison of Naïve Bayes and SVM Algorithms in Sentiment Analysis on JKN Application Data,” Int. J. Knowl. Database, vol. 04, no. 02, pp. 180–188, 2024.
S. George and V. Srividhya, “Performance Evaluation of Sentiment Analysis on Balanced and Imbalanced Dataset Using Ensemble Approach,” Indian J. Sci. Technol., vol. 15, no. 17, pp. 790–797, 2022, doi: 10.17485/ijst/v15i17.2339.
B. Satya, S. J. Muhammad Hasan, M. Rahardi, and F. F. Abdulloh, “Sentiment Analysis of Review Sestyc Using Support Vector Machine, Naive Bayes, and Logistic Regression Algorithm,” ICOIACT 2022 - 5th Int. Conf. Inf. Commun. Technol. A New W. to Make AI Useful Everyone New Norm. Era, Proceeding, no. February 2025, pp. 188–193, 2022, doi: 10.1109/ICOIACT55506.2022.9972046.
M. Raharjo, J. L. Putra, S. Heristian, and M. Napiah, “Sentiment Analysis of Video Editing Applications Using Support Vector Machine on Google Colab,” JIKA (Jurnal Inform., vol. 9, no. 2, p. 192, 2025, doi: 10.31000/jika.v9i2.13699.
F. Panjaitan, W. Ce, H. Oktafiandi, G. Kanugrahan, Y. Ramdhani, and V. H. C. Putra, “Evaluation of Machine Learning Models for Sentiment Analysis in the South Sumatra Governor Election Using Data Balancing Techniques,” J. Inf. Syst. Informatics, vol. 7, no. 1, pp. 461–478, 2025, doi: 10.51519/journalisi.v7i1.1019.
M. F. N. Fathoni, E. Y. Puspaningrum, and A. N. Sihananto, “Perbandingan Performa Labeling Lexicon InSet dan VADER pada Analisa Sentimen Rohingya di Aplikasi X dengan SVM,” Modem J. Inform. dan Sains Teknol., vol. 2, no. 3, pp. 62–76, 2024.
A. Putri et al., “Komparasi Algoritma K-NN, Naive Bayes dan SVM untuk Prediksi Kelulusan Mahasiswa Tingkat Akhir,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 3, no. 1, pp. 20–26, 2023, doi: 10.57152/malcom.v3i1.610.
T. Puspa, R. Sanjaya, A. Fauzi, A. Fitri, and N. Masruriyah, “Analisis sentimen ulasan pada e-commerce shopee menggunakan algoritma naive bayes dan Support Vector Machine Analysis of review sentiment on shopee e-commerce using the naive bayes algorithm and Support Vector Machine,” vol. 4, No. 2, pp. 16–26, 2023, doi: 10.37373/infotech.v4i1.422.
How To Cite This :
Refbacks
- There are currently no refbacks.










