Comparison of Naïve Bayes, Random Forest, and SVM Algorithm Performance in Analyzing Sentiment Regarding the Aceh Floods on Platform X
DOI:
https://doi.org/10.30871/jaic.v10i2.12250Keywords:
Aceh Floods, Naïve Bayes, Random Fores, SMOTE, Support Vector MachineAbstract
Social media has become a means for the public to express their opinions on various events, including the floods in Aceh. This study aims to analyze public sentiment and compare the performance of the Naïve Bayes, Random Forest, and Support Vector Machine (SVM) algorithms in classifying sentiment on the X (Twitter) platform. In addition, this study also evaluates the effect of applying the Synthetic Minority Over-sampling Technique (SMOTE) on improving model performance.The dataset was collected using a crawling method utilizing Twitter Harvest on the X (Twitter) platform during the period from November 18, 2025, to January 5, 2026. The data collection process yielded 1,971 Indonesian-language data points, which after preprocessing stages such as text cleaning, stemming, and duplicate removal resulted in 1,874 data points. The dataset was then divided into 80% training data (1,499 data points) and 20% test data (375 data points). The analysis results show that the majority of public opinion has a positive sentiment of 77.9% (1460 data), while negative sentiment is 22.1% (414 data). The model evaluation results show that the application of SMOTE can improve the performance of the three algorithms. The algorithm with the best performance is Support Vector Machine (SVM) with an accuracy value of 83% and an F1-score of 75% after the application of SMOTE. Based on the results of the study, the SMOTE technique has been proven to help improve the model's ability to recognize minority classes, resulting in better classification performance.
Downloads
References
[1] T. Safitri, Y. Umaidah, and I. Maulana, “Analisis Sentimen Pengguna Twitter Terhadap BTS Menggunakan Algoritma Support Vector Machine,” vol. 7, no. 1, pp. 34–41, 2023.
[2] S. M. Putri, R. Novita, and M. Afdal, “Perbandingan Algoritma Linear Regression , Support Vector Regression , dan Artificial Neural Network untuk Prediksi Data Obat,” vol. 6, no. 1, pp. 54–63, 2024, doi: 10.47065/bits.v6i1.5184.
[3] B. Z. Ramadhan, I. Riza, and I. Maulana, “Analisis Sentimen Ulasan Pada Aplikasi E-Commerce Dengan Menggunakan Algoritma Naïve Bayes,” vol. 6, no. 2, pp. 220–225, 2022.
[4] Y. Ikhsani, I. Permana, F. N. Salisah, and N. E. Rozanda, “Perbandingan Algoritma Support Vector Machine dan Naïve Bayes dalam Menganalisis Sentimen Pinjaman Online di Twitter,” vol. 6, no. 3, 2024, doi: 10.47065/bits.v6i3.6106.
[5] H. Ekawati, “Perbandingan Kinerja Algoritma K-Nearest Neighbor dan Algoritma Random Forest Untuk Klasifikasi Data Mining Pada Penyakit Gagal Ginjal,” vol. 6, no. 3, pp. 1943–1953, 2024, doi: 10.47065/bits.v6i3.6476.
[6] A. M. Rani and N. Hendrastuty, “Perbandingan Algoritma NBC Dan SVM Untuk Melakukan Analisis Sentimen Terhadap PP NO . 82 Tahun 2021,” vol. 6, no. 4, pp. 2139–2151, 2025, doi: 10.47065/bits.v6i4.6496.
[7] M. Sulhan, “Perbandingan Metode Naïve Bayes Dengan SVM Pada Analisis Sentimen Aplikasi Pemesanan Tiket Kapal Ferizy,” vol. 6, no. 4, pp. 0–9, 2025, doi: 10.47065/bits.v6i4.6715.
[8] I. Virgiawan, “Analisis Perbandingan Algoritma Naïve Bayes dan Random Forest Dalam Klasifikasi Penyakit Stroke Pada Puskesmas,” vol. 6, no. 4, pp. 2807–2814, 2025, doi: 10.47065/bits.v6i4.6771.
[9] D. Kurniawan, M. Najib, and D. Satria, “Analisis Sentimen Opini Publik Tentang Gempa Megathrust di Indonesia Menggunakan Metode Support Vector Machine dan Naïve Bayes,” vol. 6, no. 3, 2024, doi: 10.47065/bits.v6i3.6213.
[10] R. S. Andarujaya and R. R. Suryono, “Perbandingan Kinerja Algoritma Random Forest , KNN , dan SVM dalam Analisis Sentimen Cryptocurrency,” vol. 6, no. 4, pp. 2288–2299, 2025, doi: 10.47065/bits.v6i4.6572.
[11] I. T. Rahmawati and D. Alita, “Perbandingan Algoritma SVM , Random Forest , KNN untuk Analisis Sentimen Terhadap Overclaim Skincare pada Media Sosial X,” vol. 6, no. 4, pp. 2390–2402, 2025, doi: 10.47065/bits.v6i4.6782.
[12] L. Kencono and D. Darwis, “Perbandingan Algoritma NBC , SVM dan Random Forest untuk Analisis Sentimen Implementasi Starlink pada Media Sosial X,” vol. 6, no. 4, pp. 2288–2300, 2025, doi: 10.47065/bits.v6i4.6813.
[13] I. Arfyanti, T. Bustomi, and I. Haristyawan, “Perbandingan Kinerja Algoritma Klasifikasi Data Mining Untuk Prediksi Penyakit Darah Tinggi,” vol. 6, no. 3, pp. 1987–1994, 2024, doi: 10.47065/bits.v6i3.6477.
[14] M. R. Raihandika and R. R. Suryono, “Perbandingan Algoritma Random Forest , KNN , SVM Untuk Analisis,” vol. 6, no. 4, pp. 2403–2412, 2025, doi: 10.47065/bits.v6i4.6797.
[15] R. T. Aldisa and P. Maulana, “Analisis Sentimen Opini Masyarakat Terhadap Vaksinasi Booster COVID-19 Dengan Perbandingan Metode Naive Bayes, Decision Tree dan SVM,” Build. Informatics, Technol. Sci., vol. 4, no. 1, pp. 106–109, 2022, doi: 10.47065/bits.v4i1.1581.
[16] R. Windari and H. W. Nugroho, “Prediksi Rekomendasi Pemilihan Kejuruan pada Sekolah Menengah Kejuruan Menggunakan Perbandingan Metode Decision Tree C4 . 5 dan Naïve Bayes,” vol. 6, no. 4, pp. 2700–2708, 2025, doi: 10.47065/bits.v6i4.6928.
[17] E. Danuarta and D. Alita, “Perbandingan Algoritma Naïve Bayes dan Random Forest untuk Melakukan Analisis Sentimen Cyberbullying Generasi Z Pada Twitter,” vol. 6, no. 4, pp. 2448–2458, 2025, doi: 10.47065/bits.v6i4.6909.
[18] Y. Wiratama and R. Z. A. Aziz, “Perbandingan Prediksi Penyakit Stunting Balita Menggunakan Algoritma Support Vektor Machine dan Random Forest,” vol. 6, no. 2, 2024, doi: 10.47065/bits.v6i2.5543.
[19] E. A. Pranata, F. Budiman, and D. Kurniawan, “Analisis Sentimen Ulasan Mobile JKN pada Playstore dengan Perbandingan Akurasi Algoritma Naïve Bayes dan SVM,” vol. 7, no. 1, 2025, doi: 10.47065/bits.v7i1.7334.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Amalia Khoirunnisa, Novita Kurnia Ningrum

This work is licensed under a Creative Commons Attribution-ShareAlike 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 a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement 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 acknowledgement 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 (See The Effect of Open Access).








