Flood Prediction Model Using the Random Forest Algorithm in Padangsidimpuan City
DOI:
https://doi.org/10.56211/hanif.v4i1.79Keywords:
banjir,random forest, spasial-temporal, mitigasi
Abstract
Flooding is a complex environmental phenomenon influenced by meteorological, temporal, and urban conditions. This study aims to develop a flood risk prediction model in Padangsidimpuan City using the Random Forest algorithm by integrating meteorological and temporal variables. The data set consists of historical observations from Padangsidimpuan City, including rainfall, temperature, humidity, wind direction, and flood occurrence status. The data were processed and divided into training and testing sets to evaluate model performance. The results indicate that the Random Forest model achieves strong classification performance, with an accuracy of 0.98 and specificity of 0.99, demonstrating a high capability in correctly identifying non-flood conditions. The model also shows good discrimination ability, with a ROC-AUC value of approximately 0.87. However, the recall value of 0.50 suggests that only half of the actual flood events are correctly detected, primarily due to class imbalance between flood and non-flood data. Feature importance analysis reveals that short-term meteorological variables, particularly rainfall and temperature, along with temporal patterns, are the most influential factors in flood prediction. In addition, spatial interpretation shows that flood-prone areas in Padangsidimpuan City are concentrated in densely populated urban zones with limited drainage capacity, highlighting the influence of urban environmental conditions on flood risk.Overall, the Random Forest model provides a strong foundation for flood risk prediction in Padangsidimpuan City. However, further improvements in data balancing and model optimization are required to enhance sensitivity and support a more reliable flood early warning system.
Downloads
References
Electronic Document
[1] Nasional TVRINews. (2025). Banjir dan Longsor Melanda Kota Padangsidimpuan, 1.504 Warga Terkena Dampak.
[2] Detik.com. (2025). Banjir Terjang Padangsidimpuan, Satu Orang Diduga Hanyut.
[3] Hariantabagsel.com. (2024). Drainase Tidak Berfungsi, Puluhan Rumah Warga di Kota Padangsidimpuan Kebanjiran.
[4] Pemerintah Kota Padangsidimpuan. (2025). Plt. Ketua Dharma Wanita Serahkan Bantuan untuk Korban Banjir dan Longsor.
Jurnal
[5] Putra, M.R.P., Ashari, R., & Muhirin. (2025). Flood Prediction Using Machine Learning Model Integrated with Geographical Information System. Khazanah Informatika: Jurnal Ilmu Komputer dan Informatika.
[6] Maulita, I., Widiawati, C.R.A., & Wahid, A.M. (2025). Analisis Komparatif Linear Regression, Random Forest, dan Gradient Boosting untuk Prediksi Banjir. Jurnal Pendidikan dan Teknologi Indonesia (JPTI).
[10] L. Breiman, “Random Forests,” Machine Learning, vol. 45, no. 1, pp. 5–32, 2001.
[11] S. Chen, Y. Wang, and L. Zhang, “Flood susceptibility mapping using Random Forest model and GIS,” Natural Hazards, vol. 92, pp. 1–20, 2018.
[12] Düntsch, I., & Gediga, G. (2020). Confusion matrices and rough set data analysis. International Journal of Approximate Reasoning
[13] Widjiyati, “Analisis risiko banjir menggunakan Random Forest,” Jurnal Hidrologi Indonesia, vol. 5, no. 2, pp. 45–52, 2021.
Book
[8] W. K. Trochim, J. P. Donnelly, and K. Arora, Research Methods: The Essential Knowledge Base, 2nd ed. Boston, MA, USA: Cengage Learning, 2016.
[9] T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning, 2nd ed. New York, NY, USA: Springer, 2009.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Alvi Sahrin Nasution, Putri Maulida, Muhammad Hafiz

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish in Hanif Journal of Information Systems agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 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 (See The Effect of Open Access).
Similar Articles
- nurkumalalubis, Mulkan Azhari, Machine Learning-Based Phishing Email Detection: A Comparative Study of Support Vector Machine and Random Forest , Hanif Journal of Information Systems : Vol. 3 No. 2 (2026): February Edition
- Akhmad Jayadi, Kurniawan Saputra, Ahmad Rofi'i, Improving the Accuracy of Lettuce and Weed Classification Based on MobileNetV2 Features Through Segmentation , Hanif Journal of Information Systems : Vol. 3 No. 2 (2026): February Edition
You may also start an advanced similarity search for this article.









