Analisis Sentimen Program Mbg Menggunakan Algoritma Random Forest Dan Naive Bayes
Abstract
Abstrak: Transformasi digital telah mendorong perubahan besar dalam berbagai aspek kehidupan, salah satunya melalui kemunculan teknologi MBG yang memunculkan beragam opini publik. Penelitian ini menganalisis 6.728 komentar masyarakat di media sosial X (Twitter) menggunakan pendekatan text mining untuk menilai sentimen terhadap MBG serta membandingkan performa dua algoritma, yaitu Naïve Bayes dan Logistic Regression. Hasil awal menunjukkan akurasi masing-masing sebesar 90% dan 91%, namun ketidakseimbangan data dengan dominasi sentimen positif menurunkan nilai precision, recall, dan F1-Score. Melalui penerapan metode SMOTE untuk mengatasi ketimpangan data, performa kedua algoritma meningkat, dengan Logistic Regression menunjukkan hasil terbaik (akurasi 95%, precision 94%, recall 93%, dan F1-Score 95%). Temuan ini menunjukkan bahwa Logistic Regression lebih unggul dalam menganalisis sentimen masyarakat terhadap perkembangan teknologi MBG.
Kata kunci: Naïve Bayes, Logistic Regression, MBG, Analisis Sentimen.
Abstract: Digital transformation has driven significant changes in various aspects of life, one of which is through the emergence of MBG technology, which has generated diverse public opinions. This research analyzes 6,728 public comments on the social media platform X (Twitter) using a text mining approach to assess sentiment towards the MBG and to compare the performance of two algorithms: Naïve Bayes and Logistic Regression. Initial results showed respective accuracies of 90% and 91%, but data imbalance, with a dominance of positive sentiment, lowered the precision, recall, and F1-Score values. Through the application of the SMOTE method to address the data imbalance, the performance of both algorithms improved, with Logistic Regression showing the best results (95% accuracy, 94% precision, 93% recall, and 95% F1-Score). These findings indicate that Logistic Regression is superior in analyzing public sentiment towards the development of MBG technology.
Keywords: Naïve Bayes, Logistic Regression, MBG, Sentiment Analysis.
References
F. Amin, A. P. Nugraha, dan A. Yusuf, "Random Forest Optimization for Sentiment Analysis on Social Media," Procedia Comput. Sci., 2023. doi: 10.1016/j.procs.2023.01.243.
N. Fitriani dan W. Lestari, "Perbandingan Algoritma Random Forest dan Naive Bayes dalam Analisis Sentimen," J. RESTI, 2021.
R. Handayani, N. Fadhilah, dan R. Rizky, "Klasifikasi Sentimen dalam Aplikasi Pembelajaran AI," JIKA, 2023.
W. Khofifah, D. N. Rahayu, dan A. M. Yusuf, "Analisis Sentimen Menggunakan Naive Bayes Untuk Melihat Review Masyarakat Terhadap Tempat Wisata Pantai Di Kabupaten Karawang Pada Ulasan Google Maps," J. Interkom: J. Publikasi Ilm. Bidang Teknol. Inf. dan Komun., vol. 16, no. 4, hlm. 28–38, Jan. 2022.
I. H. Kusuma dan N. Cahyono, "Analisis Sentimen Masyarakat Terhadap Penggunaan E-Commerce Menggunakan Algoritma K-Nearest Neighbor," J. Inform.: J. Pengemb. IT, vol. 8, no. 3, hlm. 302–307, 2023. doi: 10.30591/jpit.v8i3.5734.
D. Purwanto, D. Lestari, dan H. Nurhadi, "Sentiment Analysis Using Machine Learning Techniques: A Review," J. Teknol. dan Sist. Komput., 2021
N. Putri dan R. Rachman, "Klasifikasi Teks Ulasan Produk Bahasa Indonesia Menggunakan Naive Bayes," J. RESTI, 2021.
M. Pratama dan D. Kurniawan, "Tantangan Bahasa Indonesia dalam Analisis Sentimen," J. Linguist. Komput., 2020.
A. D. Pratama dan H. Hendry, "Analisa Sentimen Masyarakat Terhadap Penggunaan Chatgpt Menggunakan Metode Support Vector Machine (Svm)," JIPI (J. Ilm. Penelit. dan Pembelajaran Inform.), vol. 9, no. 1, hlm. 327–338, 2024. doi: 10.29100/jipi.v9i1.4285.
P. Sari dan S. Wulandari, "Preprocessing Teks untuk Analisis Sentimen Review Produk E-Commerce," J. Inform., 2020.
A. Santosa, K. Dewi, dan R. Mahardika, "Analisis Sentimen dan Eksplorasi Isu Aplikasi Digital," J. Teknol. Inf. dan Komput., 2022.
D. Suhartono dan Y. Nugroho, "Penerapan Text Mining dalam Menganalisis Ulasan Aplikasi Digital," JTIK, 2020.
S. Surohman, S. Aji, R. Rousyati, dan F. F. Wati, "Analisa Sentimen Terhadap Review Fintech Dengan Metode Naive Bayes Classifier Dan K- Nearest Neighbor," Evolusi: J. Sains dan Manaj., vol. 8, no. 1, hlm. 93–105, 2020. doi: 10.31294/evolusi.v8i1.7535.
H. Wijaya, D. Saputra, dan B. Rachmat, "Naive Bayes Algorithm for Text Classification in Indonesian Language Review," JIKI, 2022.
H. Yulianto, T. Prasetyo, dan R. Aprilia, "Evaluasi Kepuasan Pengguna Aplikasi Chatbot," J. Sains dan Inform., 2021.
Copyright (c) 2025 Rahmat Hidayat

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


