Perbandingan Algoritma SVM, Random Forest, dan Naive Bayes Terhadap Kasus Scam di Media Sosial Twitter
Abstract
The rapid growth of information and communication technology has a significant impact on the level of cybercrime. The internet, which was originally used to expedite the exchange of information, is also misused by irresponsible parties. One of the prevalent forms of crime is scams, which are fraudulent activities aimed at gaining unlawful profits by exploiting victims through various tactics. The purpose of this research is to evaluate and compare the performance of three algorithms: Support Vector Machine (SVM), Random Forest, and Naive Bayes in analyzing public sentiment regarding scam cases on social media Twitter. The dataset consists of 9,132 tweets, which undergo preprocessing stages such as cleaning, case folding, and word normalization, leaving 8,879 tweets for analysis. Then, the Synthetic Minority Over-sampling Technique (SMOTE) is applied, with the dataset divided into 80% for training and 20% for testing. The results show that before applying SMOTE, the SVM algorithm achieved the highest accuracy at 82%, followed by Random Forest at 79%, and Naive Bayes at 74%. After applying SMOTE, accuracy significantly increased, with SVM reaching 88%, Random Forest at 84%, and Naive Bayes at 76%. This demonstrates that in sentiment analysis of scam cases, the SVM method achieves higher accuracy than both Random Forest and Naive Bayes.
Downloads
References
W. Priatna, “Dampak Pengambilan Sampel Data untuk Optimalisasi Data tidak seimbang pada Klasifikasi Penipuan Transaksi E-Commerce,” Indones. J. Comput. Sci., vol. 13, no. 2, pp. 3070–3079, 2024, doi: 10.33022/ijcs.v13i2.3698.
R. Fahlapi, A. Y. Kuntoro, and T. Asra, “Perbandingan Algoritma Klasifikasi Analisis Sentimen Pengguna Aplikasi Getcontact Dalam Pencegahan Penipuan Online,” J-INTECH (Journal Inf. Technol., no. 204, pp. 158–167, 2024, doi: https://doi.org/10.32664/j-intech.v12i1.1262.
A. T. Arsanto, A. Faizin, Z. N. Saadah, U. Y. Pasuruan, and C. V. Method, “Optimasi Algoritma Naive Bayes dengan Kombinasi SMOTETomek untuk Imbalance Class Fraud Detection,” Sist. J. Sist. Inf., vol. 13, pp. 2709–2721, 2024, doi: https://doi.org/10.32520/stmsi.v13i6.4719.
S. Adi et al., “Analisis Sentimen Aplikasi Halo Bca Di Google Play Store Menggunakan Metode Naive Bayes , Support Vector Machine Dan Random Forest Pendahuluan,” HOAQ (High Educ. Organ. Arch. Qual. J. Teknol. Inf., vol. 15, no. c, pp. 69–79, 2024, doi: https://doi.org/10.52972/hoaq.vol15no2.p69-79.
H. Nalatissifa, W. Gata, S. Diantika, and K. Nisa, “Perbandingan Kinerja Algoritma Klasifikasi Naive Bayes , Support Vector Machine ( SVM ), dan Random Forest untuk Prediksi Ketidakhadiran di Tempat Kerja,” J. Inform., vol. 5, no. 4, pp. 578–584, 2021, doi: https://doi.org/10.32493/informatika.v5i4.7575.
Y. W. Sitorus, P. Sukarno, and S. Mandala, “Analisis Deteksi Malware Android menggunakan metode Support Vector Machine & Random Forest,” Eng. J. Telkom Univ., vol. 8, no. 6, pp. 12500–12518, 2021, [Online]. Available: https://openlibrarypublications.telkomuniversity.ac.id/index.php/engineering/article/view/16864
M. Samantri and Afiyati, “Perbandingan Algoritma Support Vector Machine dan Random Forest untuk Analisis Sentimen Terhadap Kebijakan Pemerintah Indonesia Terkait Kenaikan Harga BBM Tahun 2022,” J. JTIK (Jurnal Teknol. Inf. Dan Komunikasi), vol. 8, no. 1, pp. 1–9, 2024, doi: https://doi.org/10.35870/jtik.v8i1.1202.
P. Cahyani and L. Abdillah, “Perbandingan Performa Algoritma Naïve Bayes , SVM dan Random Forest : Studi Kasus Analisis Sentimen Pengguna Sosial Media X,” KALBISCIENTIA (Jurnal Sains dan Teknol., vol. 11, no. 02, pp. 12–21, 2024, doi: https://doi.org/10.53008/kalbiscientia.v11i02.3624.
D. Irawan, E. B. Perkasa, D. Wahyuningsih, and E. Helmud, “Perbandingan Klassifikasi SMS Berbasis Support Vector Machine , Naive Bayes Classifier , Random Forest dan Bagging Classifier,” J. Sisfokom (Sistem Inf. dan Komputer), vol. 10, pp. 432–437, 2021, doi: https://doi.org/10.32736/sisfokom.v10i3.1302.
P. I. Purnama and R. R. Suryono, “Analisis Sentimen Acara Clash of Champions dengan Algoritma Naïve Bayes dan Support Vector Machine,” Build. Informatics, Technol. Sci., vol. 6, no. 4, pp. 2277–2287, 2025, doi: https://doi.org/10.47065/bits.v6i4.6575.
D. N. Agustia, R. R. Suryono, U. T. Indonesia, L. Ratu, and K. B. Lampung, “Comparison Of Naïve Bayes , Random Forest , And Logistic Regression Algorithms For Sentiment Analysis Online Gambling Komparasi Algoritma Naïve Bayes , Random Forest , Dan Logistic Regresion Untuk Analisis,” INOVTEK Polbeng, vol. 10, no. 1, pp. 284–295, 2025, doi: https://doi.org/10.35314/prk93630.
F. A. Artanto, “Support Vector Machine Berbasis Particle Swarm Optimization Pada Analisis Sentimen Anggota KPPS,” J. Fasilkom, vol. 14, no. 1, pp. 75–79, 2024, doi: https://doi.org/10.37859/jf.v14i1.6795.
S. Syafrizal, M. Afdal, and R. Novita, “Analisis Sentimen Ulasan Aplikasi PLN Mobile Menggunakan Algoritma Naïve Bayes Classifier dan K-Nearest Neighbor,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 1, pp. 10–19, 2023, doi: https://doi.org/10.57152/malcom.v4i1.983.
A. Karimah, G. Dwilestari, and M. Mulyawan, “Analisis Sentimen Komentar Video Mobil Listrik Di Platform Youtube Dengan Metode Naive Bayes,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 1, pp. 767–737, 2024, doi: https://doi.org/10.36040/jati.v8i1.8373.
I. F. Rahman, A. N. Hasanah, and N. Heryana, “Analisis Sentimen Ulasan Pengguna Aplikasi Samsat Digiital Nasional (Signal) Dengan Menggunakan Metode Naïve Bayes Classifier,” J. Inform. dan Tek. Elektro Terap., vol. 12, no. 2, pp. 963–969, 2024, doi: http://dx.doi.org/10.23960/jitet.v12i2.4073.
J. Ipmawati, S. Saifulloh, and K. Kusnawi, “Analisis Sentimen Tempat Wisata Berdasarkan Ulasan pada Google Maps Menggunakan Algoritma Support Vector Machine,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 1, pp. 247–256, 2024, doi: https://doi.org/10.57152/malcom.v4i1.1066.
A. T. Susilawati, N. A. Lestari, and P. A. Nina, “Analisis Sentimen Publik Pada Twitter Terhadap Boikot Produk Israel Menggunakan Metode Naïve Bayes,” Nian Tana Sikk. J. Ilm. Mhs., vol. 2, no. 1, pp. 26–35, 2024, doi: https://doi.org/10.59603/niantanasikka.v2i1.240.
A. Kevin, K., Enjeli, M., & Wijaya, “Analisis Sentimen Pengunaaan Aplikasi Kinemaster Menggunakan Metode Naive Bayes,” J. Ilm. Comput. Sci., vol. 2, pp. 89–98, 2024, doi: https://doi.org/10.58602/jics.v2i2.24.
C. C. Muhamad Fajar Yudhistira Herjanto, “Analisis Sentimen Ulasan Pengguna Aplikasi Sirekap Pada Play Store Menggunakan Algoritma Random Forest Classifer,” J. Inform. dan Tek. Elektro Terap., vol. 12, no. 2, pp. 1204–1210, 2024, doi: http://dx.doi.org/10.23960/jitet.v12i2.4192.
E. Yuniar and N. Hendrastuty, “Perbandingan Metode Naive Bayes , Random Forest dan SVM Untuk Analisis Sentimen Pada Twitter Tentang Kenaikan Gaji Guru,” Build. Informatics, Technol. Sci., vol. 6, no. 4, pp. 2480–2490, 2025, doi: https://doi.org/10.47065/bits.v6i4.6970.
A. N. Hasanah, B. N. Sari, U. S. Karawang, T. Timur, and J. Barat, “Analisis Sentimen Ulasan Pengguna Aplikasi Jasa Ojek Online Maxim Pada Google Play Dengan Metode Naïve Bayes Classifier,” J. Inform. dan Tek. Elektro Terap., vol. 12, no. 1, pp. 90–96, 2024, doi: http://dx.doi.org/10.23960/jitet.v12i1.3628.
R. A. Saputra, “Analisis Sentimen Review Skincare Skintific Dengan Algoritma Support Vector Machine,” J. Inform. dan Tek. Elektro Terap., vol. 12, no. 2, 2024, doi: http://dx.doi.org/10.23960/jitet.v12i2.4095.
S. Andrean, “Review aplikasi kredivo menggunakan analisis sentimen dengan algoritma support vector machine 1),” rabit, vol. 9, no. 1, pp. 39–49, 2024, doi: https://doi.org/10.36341/rabit.v9i1.4107.
I. Septiana and D. Alita, “Perbandingan Random Forest dan SVM dalam Analisis Sentimen Quick Count Pemilu 2024,” JPIT(Jurnal Pengemb. IT), vol. 9, no. 3, pp. 224–233, 2024, doi: https://doi.org/10.30591/jpit.v9i3.6640.
B. A. Maulana and M. J. Fahmi, “Sentiment Analysis of Pluang Applications With Naive Bayes and Support Vector Machine ( SVM ) Algorithm Analisis Sentimen Terhadap Aplikasi Pluang Menggunakan Algoritma Naive Bayes dan Support Vector Machine ( SVM ),” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. April, pp. 375–384, 2024, doi: https://doi.org/10.57152/malcom.v4i2.1206.
W. Ningsih, B. Alfianda, and D. Wulandari, “Comparison of Naive Bayes and SVM Algorithms in Twitter Sentiment Analysis on Electric Car Use in Indonesia Perbandingan Algoritma SVM dan Naïve Bayes dalam Analisis Sentimen Twitter pada Penggunaan Mobil Listrik di Indonesia,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. April, pp. 556–562, 2024, doi: https://doi.org/10.57152/malcom.v4i2.1253.
K. W. Chandra and H. Irsyad, “Efektifitas SMOTE dalam Mengatasi Imbalanced Class Algoritma K-Nearest Neighbors pada Analisis Sentimen terhadap Starlink,” J. Ilmu Komput. Dan Inform., vol. 4, no. 1, pp. 31–42, 2024, doi: https://doi.org/10.54082/jiki.132.
Sasmita, R. N. J. S. Intam, D. F. Surianto, and Muhammad Fajar, “Analisis Sentimen Terhadap Kontroversi Putusan MK Mengenai Usia Capres-Cawapres Menggunakan Multi-Layer Perceptron Dengan Teknik SMOTE,” Fakt. Exacta, vol. 17, no. 2, pp. 188–198, 2024, doi: 10.30998/faktorexacta.v17i2.22442.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Perbandingan Algoritma SVM, Random Forest, dan Naive Bayes Terhadap Kasus Scam di Media Sosial Twitter
Pages: 907-919
Copyright (c) 2025 Rizky Herdian Saputra, Ryan Randy Suryono

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).