Rainfall is a crucial factor in water resource management and disaster mitigation. This study develops a rainfall prediction model for DKI Jakarta using a Gated Recurrent Unit (GRU) with hyperparameter optimization to enhance prediction accuracy. Daily rainfall data is processed using a sliding window technique, where 30 days of historical data serve as input to predict rainfall on the 31st day. The model is trained with various configurations of batch sizes and the number of neurons in hidden layers to determine the optimal performance. The results of hyperparameter tuning show that the batch size configuration of 64, hidden layer 1 with 32 neurons, and hidden layer 2 with 128 neurons produces an MAE of 6.66 and an RMSE of 13.94. The model is quite good at capturing daily rainfall patterns but still has difficulty in predicting extreme rainfall spikes
Copyrights © 2025