Comparative Analysis of LSTM and GRU for River Water Level Prediction - Faris, Fakhri Al; Taqwa, Ahmad; Handayani, Ade Silvia; Husni, Nyayu Latifah; Caesarendra, Wahyu; Asriyadi, Asriyadi; Novianti, Leni; Rahman, M. Arief (Jurnal Teknik Informatika (Jutif), 2025)
Accurate river water level prediction is essential for flood management, especially in tropical areas like Palembang. This study systematically analyzes the performance of two deep learning models, Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU), for real-time water level forecasting using hourly rainfall and water level data collected from automatic sensors. A series of experiments were conducted by varying window sizes (10, 20, 30) and the number of layers (1, 2, 3) for both models, with model performance assessed using RMSE, MAE, MAPE, and NSE. The results demonstrate that both window size and network depth significantly influence prediction accuracy and computational efficiency. The LSTM model achieved its highest accuracy with a window size of 30 and a single layer, while the GRU model performed best with a window size of 20 and two layers. This work contributes by systematically analyzing hyperparameter configurations of LSTM and GRU models on hourly rainfall and water level time series for flood-prone regions, offering empirical insight into parameter tuning in recurrent neural architectures for hydrological forecasting. These findings highlight the importance of careful parameter selection in developing reliable early warning systems for flood risk management.