International Journal of Informatics Engineering and Computing
Vol. 3 No. 2 (2026): International Journal of Informatics Engineering and Computing

Comparing Machine Learning Algorithms for Flood Prediction

Hamzah (Universitas Respati Yogyakarta, Indonesia)
Selly Dwipuspita Ayuningsih (Universitas Teknologi Mataram, Indonesia)



Article Info

Publish Date
08 Sep 2026

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.

Copyrights © 2026






Journal Info

Abbrev

ijimatic

Publisher

Subject

Computer Science & IT

Description

International Journal of Informatics Engineering and Computing (IJIMATIC) is an international, peer-reviewed, open-access journal that publishes original theoretical and empirical work on the science of informatics and its application in multiple fields. Our concept of informatics encompasses ...