Comparing Machine Learning Algorithms for Flood Prediction

Authors

  • Hamzah Universitas Respati Yogyakarta, Indonesia
  • Selly Dwipuspita Ayuningsih Universitas Teknologi Mataram, Indonesia

DOI:

https://doi.org/10.70687/869y5616

Keywords:

Flood, Prediction, K-Means, Random Forest

Abstract

Flooding is a major environmental hazard that requires accurate and reliable prediction to support disaster mitigation and early warning systems. This study applied a combination of K-Means clustering and Random Forest classification to predict flood conditions based on water-level data from DKI Jakarta. The dataset was obtained from Open Data Jakarta and contained observations recorded from January to December 2020. We utilized K-Means to group water-height observations and evaluated cluster configurations from k = 3 to k = 20. The resulting cluster information was then incorporated as an additional feature into the Random Forest model. We evaluated the model using Accuracy, Precision, Recall, F1 Score, and a confusion matrix. The results showed that the K-Means configuration affected the classification performance. The highest F1 Score reached 0.90 at k = 14, while the highest Accuracy reached 0.96 at k = 15 and k = 20. The Random Forest model achieved an Accuracy of 0.95, with weighted Precision, Recall, and F1 Score of 0.96, 0.95, and 0.95, respectively. Class 0 achieved the highest F1 Score of 0.98, while Class 2 obtained a Recall of 0.99. These findings demonstrate that the K-Means and Random Forest approach can effectively support flood prediction using water-level data and provide a promising basis for developing data-driven flood monitoring and prediction systems.

Downloads

Download data is not yet available.

Downloads

Published

2026-09-08

How to Cite

Comparing Machine Learning Algorithms for Flood Prediction. (2026). International Journal of Informatics Engineering and Computing, 3(2), 74-83. https://doi.org/10.70687/869y5616

Similar Articles

You may also start an advanced similarity search for this article.