Rainfall Forecasting in Jakarta Using Machine Learning and Transformer-Based Time Series Models

Author: Sudiana, Dodi
Informations
JournalLecture Notes in Electrical Engineering
Volume & IssueVol. 1634 LNEE
Publication Year2026
ISSN18761100
Source TypeScopus
Abstract
Rainfall forecasting plays a crucial role in mitigating the impacts of extreme weather events, particularly in regions such as Jakarta, where accurate predictions are essential for urban planning and flood prevention. This study investigates the performance of tree-based machine learning models—Random Forest (RF) and XGBoost—as well as deep learning models, including Long Short-Term Memory (LSTM) and a hybrid LSTM–Transformer architecture, for daily rainfall forecasting using time-series data. The dataset consists of daily meteorological observations collected in Jakarta between 2010 and 2020. All models are formulated under a one-step-ahead forecasting framework and trained using a chronological data-splitting strategy to reflect realistic operational conditions. Model configurations are obtained through systematic hyperparameter optimization, with tree-based models emphasizing ensemble robustness and controlled complexity, while deep learning architectures are designed to capture both local and global temporal dependencies in rainfall patterns. Model performance is evaluated using Mean Squared Error (MSE), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE). The results indicate that RF outperforms XGBoost on larger datasets, achieving an error improvement of 84.22%, whereas XGBoost performs better on smaller datasets with an improvement of 27.86% but shows declining performance as data complexity increases. LSTM and LSTM–Transformer models exhibit comparable performance, with only a 0.73% difference in error, suggesting limited additional benefit from attention mechanisms under the studied data conditions. Overall, the findings highlight the importance of aligning model complexity with dataset characteristics to achieve robust and reliable rainfall forecasting in urban environments. © The Author(s), under exclusive license to Springer Nature Switzerland AG 2026.
Documents & Links

© 2025 Universitas Indonesia. All rights reserved.