Perbandingan Metode K-NN Dan Metode Random Forest Untuk Analisis Sentimen pada Tweet Isu Minyak Goreng di Indonesia
DOI:
https://doi.org/10.30865/mib.v7i2.5900Keywords:
Sentiment, Cooking Oil, Twitter, K-NN, Random ForestAbstract
Along with the development of technological advances, a lot of social media is used by humans, one of which is Twitter social media. On Twitter social media, we can find a lot of text data, opinions and public opinion, as the issue of cooking oil is currently hot in Indonesia. In this study, the K-NN and Random Forest methods were used, and the purpose of this study was to compare the two methods in sentiment analysis on the issue of cooking oil. The results of the accuracy of these two methods are not too far apart. Each of the two methods used will be divided into three research scenarios, the first is scenario 1, a collection of 500 data, scenario 2, a collection of 800 data, and scenario 3, a collection of 1,000 data, where the ratio of training data and test data is 80:20. The test results for the K-NN method in scenario 2 are superior with an accuracy presentation of 74.58%, 56.75% precision and 44.57% recall and the lowest result is the K-NN method scenario 1 with an accuracy presentation of 71. 50%, 47.83% precision and 37.45% recall. The average test results for the K-NN method are 72.86% accuracy, 52.26% precision and 41.04% recall. While the average results of the random forest method are 73.37% accuracy, 52.26% precision and 34.28% recallReferences
F. Syadid, “Analisis Sentimen Komentar Netizen Terhadap Calon Presiden Indonesia 2019 Dari Twitter Menggunakan Algoritma Term Frequency-Invers Document Frequency (Tf- Idf) Dan Metode Multi Layer Perceptron (Mlp) Neural Network,†2019.
Susilowati, “Pemanfaatan Aplikasi Tiktok Sebagai Personal Branding Di Instagram,†Jurnal Komunikasi, vol. 9, no. 2, pp. 176–185, 2018.
T. Hendrawati and C. P. Yanti, “Analysis of Twitter Users Sentiment against the Covid-19 Outbreak Using the Backpropagation Method with Adam Optimization,†Journal of Electrical, Electronics and Informatics, vol. 5, no. 1, 2021.
C. Siahaan, A. Febri Herawati, and D. Adrian, “Pemberitaan Kelangkaan Minyak Goreng Di Media Online Dan Kepanikan Masyarakat,†vol. 4, no. 2, 2022.
H. S. Utama, D. Rosiyadi, D. Aridarma, and B. S. Prakoso, “Sentimen Analisis Kebijakan Ganjil Genap Di Tol Bekasi Menggunakan Algoritma Naive Bayes Dengan Optimalisasi Information Gain,†Jurnal Pilar Nusa Mandiri, vol. 15, no. 2, pp. 247–254, Sep. 2019, doi: 10.33480/pilar.v15i2.705.
B. Andrianto and S. Adinugroho, “Analisis Sentimen Konten Radikal Melalui Dokumen Twitter Menggunakan Metode Backpropagation,†vol. 2, no. 12, pp. 7380–7385, 2018.
W. E. Nurjanah, R. S. Perdana, and M. A. Fauzi, “Analisis Sentimen Terhadap Tayangan Televisi Berdasarkan Opini Masyarakat pada Media Sosial Twitter menggunakan Metode K-Nearest Neighbor dan Pembobotan Jumlah Retweet,†Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer (J-PTIIK) Universitas Brawijaya, vol. 1, no. 12, pp. 1750–1757, 2019.
R. Puspita and A. Widodo, “Perbandingan Metode KNN, Decision Tree, dan Naïve Bayes Terhadap Analisis Sentimen Pengguna Layanan BPJS,†Jurnal Informatika Universitas Pamulang, vol. 5, no. 4, p. 646, 2021, doi: 10.32493/informatika.v5i4.7622.
H. C. Morama, D. E. Ratnawati, and I. Arwani, “Analisis Sentimen berbasis Aspek terhadap Ulasan Hotel Tentrem Yogyakarta menggunakan Algoritma Random Forest Classifier,†vol. 6, no. 4, pp. 1702–1708, 2022.
M. Jabal Tursina, “Sentimen Analisis Sistem Zonasi Sekolah Pada Media Sosial Youtube Menggunakan Metode K-Nearest Neighbor Dengan Algoritma Levenshtein Distance,†Universitas Islam Negeri Syarif Hidayatullah Jakarta, 2019.
Yoga Religia, Agung Nugroho, and Wahyu Hadikristanto, “Klasifikasi Analisis Perbandingan Algoritma Optimasi pada Random Forest untuk Klasifikasi Data Bank Marketing,†Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 5, no. 1, pp. 187–192, 2021, doi: 10.29207/resti.v5i1.2813.
Andreyestha, A. D. Suriyanto, and W. E. Pangesti, “Analisa sentimen terhadap tagar# dirumahaja melalui twitter di Indonesia,†Intelektiva : Jurnal Ekonomi, Sosial dan Humaniora, vol. 2, no. 09, pp. 9–17, 2021.
O. Somantri and Dairoh, “Analisis Sentimen Penilaian Tempat Tujuan Wisata Kota Tegal Berbasis Text Mining,†Jurnal Edukasi dan Penelitian Informatika, vol. 5, no. 2, 2019, [Online]. Available: www.google.com/maps
P. Studi, T. Informatika, and S. S. Indonesia, “Prediksi Kelulusan Mahasiswa Stmik Stikom Indonesia Pasca Covid-19 Dengan Metode K-Nearest Neighbor,†2020.
R. Siringoringo, “Klasifikasi Data Tidak Seimbang Menggunakan Algoritma Smote Dan K-Nearest Neighbor,†2018.
H. Chyntia Morama, D. E. Ratnawati, and I. Arwani, “Analisis Sentimen berbasis Aspek terhadap Ulasan Hotel Tentrem Yogyakarta menggunakan Algoritma Random Forest Classifier,†2022. [Online]. Available: http://j-ptiik.ub.ac.id
R. M. Awangga and N. H. Khonsa’, “Analisis Performa Algoritma Random Forest dan Naive Bayes Multinomial pada Dataset Ulasan Obat dan Ulasan Film,†InComTech : Jurnal Telekomunikasi dan Komputer, vol. 12, no. 1, p. 60, Apr. 2022, doi: 10.22441/incomtech.v12i1.14770.
N. L. W. S. R. Ginantra, C. P. Yanti, G. D. Prasetya, I. B. G. Sarasvananda, and I. K. A. G. Wiguna, “Analisis Sentimen Ulasan Villa di Ubud Menggunakan Metode Naive Bayes, Decision Tree, dan K-NN,†Jurnal Nasional Pendidikan Teknik Informatika (JANAPATI), vol. 11, no. 3, pp. 205–215, Dec. 2022, doi: 10.23887/janapati.v11i3.49450.
A. Wandani, F. Fauziah, and A. Andrianingsih, “Sentimen Analisis Pengguna Twitter pada Event Flash Sale Menggunakan Algoritma K-NN, Random Forest, dan Naive Bayes,†J-SAKTI (Jurnal Sains Komputer dan Informatika), vol. 5, no. 2, pp. 651–665, 2021.
Downloads
Published
Issue
Section
License

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