Perbandingan Metode Naive Bayes, Random Forest dan SVM Untuk Analisis Sentimen Pada Twitter Tentang Kenaikan Gaji Guru
Abstract
The increase in teacher salaries has become a highly debated issue within the community, with various opinions being expressed through social media, particularly Twitter. This study aims to analyze public sentiment regarding the teacher salary increase policy using three machine learning algorithms: Naïve Bayes, Random Forest, and Support Vector Machine (SVM). The data used consists of 6010 tweets collected on the topic, which were processed into 5531 data points after cleaning and preprocessing. This study evaluates the performance of each algorithm using accuracy, precision, recall, and F1-score metrics. The results show that SVM achieved the highest accuracy (86%) before applying the SMOTE technique, followed by Random Forest (85%) and Naïve Bayes (84%). After applying SMOTE to address data imbalance, Random Forest showed a significant performance improvement, with accuracy reaching 99%, followed by SVM (98%) and Naïve Bayes (89%). These results indicate that the SMOTE technique can effectively improve model performance, particularly in handling the imbalance between positive, negative, and neutral sentiment data. This study provides new insights into how the public responds to the teacher salary increase policy, while also introducing the use of SMOTE to enhance accuracy in sentiment analysis on social media.
Downloads
References
J. I. Manajemen, H. Jurnal, M. Deka Faathir, and F. Fauziya, “Analisis Tingkat Gaji pada Kinerja Guru di MIS Muslimin Cihurang,” JURNAL EKONOMIKA45, vol. 12, no. 1, 2024.
Y. Wang, J. Guo, C. Yuan, and B. Li, “Sentiment Analysis of Twitter Data,” MDPI, Nov. 01, 2022, doi: 10.3390/app122211775.
N. R. Ramadhan and N. Hendrastuty, “Perbandingan Algoritma Naïve Bayes dan LSTM untuk Analisis Sentimen Terhadap Opini Masyarakat Tentang Sandwich Generation,” Technology and Science (BITS), vol. 6, no. 3, pp. 1677–1687, 2024, doi: 10.47065/bits.v6i3.6385.
R. Nurhidayat and N. Hendrastuty, “Analisis Sentimen Komentar Media Sosial Twitter Terhadap Tes CPNS dengan Algoritma Naive Bayes,” Technology and Science (BITS), vol. 6, no. 3, pp. 1477–1489, 2024, doi: 10.47065/bits.v6i3.6148.
I. Bagus, G. Sarasvananda, D. Selivan, M. L. Radhitya, N. Tri, and A. Putra, “Analisis Sentimen Pada Pembelajaran Daring Di Indonesia Melalui Twitter Menggunakan Naïve Bayes Classifier”, SINTECH, vol 5
I. Septiana and D. Alita, “Perbandingan Random Forest dan SVM dalam Analisis Sentimen Quick Count Pemilu 2024,” Jurnal Informatika: Jurnal Pengembangan IT, vol. 9, no. 3, pp. 224–233, Dec. 2024, doi: 10.30591/jpit.v9i3.6640.
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,” Technology and Science (BITS), vol. 6, no. 3, 2024, doi: 10.47065/bits.v6i3.6213.
Y. A. Singgalen, “A Hybrid CNN-LSTM Model with SMOTE for Enhanced Sentiment Analysis of Hotel Reviews,” Technology and Science (BITS), vol. 6, no. 3, pp. 1363–1373, 2024, doi: 10.47065/bits.v6i3.6301.
E. Septiana Pane, C. Caroline, “Optimalisasi Evaluasi Pelaksanaan Pelatihan Melalui Analisis Sentimen Otomatis Dengan Model Text Classification.” Prosiding PITNAS Widyaiswara, 2024
M. Syiarul Amrullah and A. Yuniarti, “Effective Coronary Artery Disease Prediction Using Bayesian Optimization Algorithm and Random Forest,” Technology and Science (BITS), vol. 6, no. 2, 2024, doi: 10.47065/bits.v6i2.5554.
A. Erfina and M. R. N. R. Alamsyah, “Implementation of Naive Bayes classification algorithm for Twitter user sentiment analysis on ChatGPT using Python programming language,” Data and Metadata, vol. 2, Jan. 2023, doi: 10.56294/dm202345.
L. Rofiqi and M. Akbar, “Analisis Sentimen Terkait RUU Perampasan Aset dengan Support Vector Machine,” JEKIN - Jurnal Teknik Informatika, vol. 4, no. 3, pp. 529–538, Aug. 2024, doi: 10.58794/jekin.v4i3.824.
D. Duei Putri, G. F. Nama, and W. E. Sulistiono, “Analisis Sentimen Kinerja Dewan Perwakilan Rakyat (DPR) Pada Twitter Menggunakan Metode Naive Bayes Classifier,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 10, no. 1, Jan. 2022, doi: 10.23960/jitet.v10i1.2262.
S. Jessica Angelina, A. Bijaksana Putra Negara, H. Muhardi, J. H. Nawawi, and K. Barat, “Analisis Pengaruh Penerapan Stopword Removal Pada Performa Klasifikasi Sentimen Tweet Bahasa Indonesia,” Jurnal Aplikasi dan Riset Informatika, vol. 02, no. 1, 2023, doi: 10.26418/juara.v2i1.69680.
R. Ulgasesa, A. B. P. Negara, and T. Tursina, “Pengaruh Stemming Terhadap Performa Klasifikasi Sentimen Masyarakat Tentang Kebijakan New Normal,” Jurnal Sistem dan Teknologi Informasi (JustIN), vol. 10, no. 3, p. 286, Sep. 2022, doi: 10.26418/justin.v10i3.53880.
M. Al Khadafi, K. Paranita Kartika, and F. Febrinita, “Penerapan Metode Naïve Bayes Classifier Dan Lexicon Based Untuk Analisis Sentimen Cyberbullying Pada BPJS,” JATI (Jurnal Mahasiswa Teknik Informatika), vol 6 no 2, 2022, doi 10.36040/jati.v6i2.5633
A. Apriani, H. Zakiyudin, and K. Marzuki, “Penerapan Algoritma Cosine Similarity dan Pembobotan TF-IDF System Penerimaan Mahasiswa Baru pada Kampus Swasta,” Jurnal Bumigora Information Technology (BITe), vol. 3, no. 1, pp. 19–27, Jul. 2021, doi: 10.30812/bite.v3i1.1110.
A. Salsabila and M. Nasution, “Implementation of the Naïve Bayes Algorithm to Predict New Student Admissions,” Technology and Science (BITS), vol. 6, no. 1, 2024, doi: 10.47065/bits.v6i1.5363.
M. Putra and Erwin Harahap, “Machine Learning pada Prediksi Kelulusan Mahasiswa Menggunakan Algoritma Random Forest,” Jurnal Riset Matematika, pp. 127–136, Dec. 2024, doi: 10.29313/jrm.v4i2.5102.
T. T. Thet, J. C. Na, and C. S. G. Khoo, “Aspect-based sentiment analysis of movie reviews on discussion boards,” J Inf Sci, vol. 36, no. 6, pp. 823–848, Dec. 2010, doi: 10.1177/0165551510388123.
B. F. S. Supriyanto and S. Rosalin, “Analisis Sentimen Program Merdeka Belajar dengan Text Analysis Wordcloud & Word Frequency,” Jurnal Minfo Polgan, vol. 12, no. 1, pp. 25–32, Mar. 2023, doi: 10.33395/jmp.v12i1.12312.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Perbandingan Metode Naive Bayes, Random Forest dan SVM Untuk Analisis Sentimen Pada Twitter Tentang Kenaikan Gaji Guru
Pages: 2480-2490
Copyright (c) 2025 Eny Yuniar, Nirwana Hendrastuty

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).