High-resolution rainfall observations from Automatic Weather Stations (AWS) are essential for hydrometeorological analysis, yet operational sensor and communication failures frequently create missing values. This study compared Long Short-Term Memory (LSTM) and Transformer architectures for imputing missing 10-minute rainfall observations recorded at the Banten Climatological Station AWS in South Tangerang during 2021-2025. Rainfall was modeled using a sliding window containing rainfall at the previous three intervals together with concurrent air temperature and relative humidity. The chronologically ordered dataset comprised 242,497 valid samples and was divided into training, validation, and testing subsets using a 60:20:20 ratio. Each architecture was trained with the Adam optimizer for up to 100 epochs under batch sizes of 32, 16, and 8, with early stopping used to control overfitting. Performance was assessed using root mean square error, mean absolute error, and the coefficient of determination. The best LSTM configuration used a batch size of 8 and achieved an RMSE of 1.1520, an MAE of 0.5140, and an R² of 0.6626 on the test set. The Transformer with a batch size of 8 obtained an RMSE of 0.8287, an MAE of 0.3635, and an R² of 0.8244. These results demonstrate that self-attention represented short-range multivariate dependencies more effectively than recurrent memory under the imbalanced rainfall distribution Keywords :automatic weather station; imputation; rainfall; LSTM; tansformer..
Copyrights © 2026