Implementation of Naïve Bayes and Decision Tree Algorithms for Sentiment Analysis on the Impact of Hydrometeorological Disasters
Implementasi Algoritma Naïve Bayes dan Decision Tree pada Sentimen Dampak Bencana Hidrometeorologi
DOI:
https://doi.org/10.21070/ups.11584Keywords:
Analysis Sentiment, Hydrometeorology Disaster, Naïve Bayes, Term Frequenncy-Invers Document Frequency (TF-IDF), Decision Tree, Social MediaAbstract
Hydrometeorological disasters often trigger public responses on social media. it’s required analysis public opinion toward such disaster. This study compares the performance of Decision Tree and Naïve Bayes Algorithm to analyze performance on analyzing sentiments of respond related to hydrometeorological disaster. The dataset that used contains of 11890 comments. Comments labeled into Positive, Negative, and neutral then processed by preprocessing, TF-IDF weighting, and classification with 5-fold cross validation. Validation results Naïve Bayes had mean accuracy by 0.79 which higher than Decision Tree, which scored 0,65. Naïve Bayes also got 0.79 score on accuracy, precision, recall, and F1-Score compares to Decision tree that scored scored 0.63, 0.70, 0.63, and 0.64 respectively. Because the gap of the mean accuracy and test accuracy wasn’t far off, concludes that Naïve Bayes have better generalization than Decision Tree. This result shows that Naïve Bayes is better than Decision Tree on classification of Hydrometeorological Disaster respond.
References
A. Khairani and A. Guspa, “Pengaruh Self Control terhadap Toxic Online Disinhibition Effect pada Generasi Z Pengguna Aplikasi X,” vol. 3, no. 1, pp. 243–253, 2025.
D. Erokhin and N. Komendantova, “International Journal of Disaster Risk Reduction Social media data for disaster risk management and research,” Int. J. Disaster Risk Reduct., vol. 114, no. June, p. 104980, 2024, doi: 10.1016/j.ijdrr.2024.104980.
M. Karimiziarani and H. Moradkhani, “International Journal of Disaster Risk Reduction Social response and Disaster management : Insights from twitter data Assimilation on Hurricane Ian,” Int. J. Disaster Risk Reduct., vol. 95, no. July, p. 103865, 2023, doi: 10.1016/j.ijdrr.2023.103865.
S. M. Anugerah, R. Wijaya, and M. A. Bijaksana, “Sentimen Analysis Social Media for Disaster using Naïve Bayes and IndoBERT,” vol. 11, no. 1, pp. 51–58, 2024.
V. R. Prasetyo, G. Erlangga, D. A. Prima, U. Surabaya, and P. Korespondensi, “Analisis sentimen untuk identifikasi bantuan korban bencana alam berdasarkan data di Twitter menggunakan metode k-means dan Naïve Bayes,” vol. 10, no. 5, pp. 1055–1062, 2023, doi: 10.25126/jtiik.2023107077.
I. F. Rozi, A. T. Firdausi, and K. Islamiyah, “Analisis sentimen pada Twitter mengenai pascabencana menggunakan metode Naïve Bayes dengan fitur n-gram,” pp. 33–39.
M. Das, S. Kamalanathan, and P. Alphonse, “A Comparative Study on TF-IDF feature Weighting Method and its Analysis using Unstructured Dataset,” vol. 5571, pp. 0–2, 2021.
P. Yuniar, “Analisis Sentimen Ulasan pada Gojek Menggunakan Metode Naïve Bayes,” vol. 23, no. 2, pp. 164–175, 2023.
N. Q. Rizkina and F. N. Hasan, “Analisis Sentimen Komentar Netizen Terhadap Pembubaran Konser NCT 127 Menggunakan Metode Naive Bayes,” vol. 4, no. 4, pp. 1136–1144, 2023, doi: 10.47065/josh.v4i4.3803.
A. Gerliandeva, Y. H. Chrisnanto, and H. Ashaury, “Optimasi Klasifikasi Sentimen pada Komentar Online menggunakan Multinomial Naïve Bayes dan Ekstraksi Fitur TF-IDF serta N-grams Optimization of Sentiment Classification on Online Comments using Multinomial Naïve Bayes and TF-IDF Feature Extraction and N-grams,” no. X, pp. 259–272, 2024, doi: 10.56873/jpkm.v9i2.5585.
J. Khatib and S. Dalam, “Indonesian Journal of Computer Science,” vol. 13, no. 1, pp. 1051–1063, 2024.
J. Ilmiah, T. Informasi, and U. Sriwijaya, “Analisis Sentimen Pengguna Terhadap Faktor Penggunaan PayPal Menggunakan Metode Decision Tree,” vol. 18, no. 1, pp. 71–83, 2024.
S. Pawar, K. Pandith, and M. G. Rao, “Text Document Categorization Using Random Forest and c4 . 5 Decision Tree Classifier,” vol. 7, no. 2, pp. 211–220, 2023.
F. M. Akbar, R. Hermansyah, S. Lusa, D. I. Sensuse, and N. Safitri, “Analisis sentimen untuk evaluasi reputasi merek motor XYZ berkaitan dengan isu rangka motor di Twitter menggunakan machine learning,” vol. 11, no. 3, pp. 647–654, 2024, doi: 10.25126/jtiik.938663.
G. A. Trianto et al., “KLASIFIKASI OPINI TERHADAP RESESI INDONESIA 2023 PADA TWITTER MENGGUNAKAN ALGORITMA DECESION,” pp. 1–9, 2023.
Downloads
Additional Files
Posted
Categories
License
Copyright (c) 2026 UMSIDA Preprints Server

This work is licensed under a Creative Commons Attribution 4.0 International License.