Perfomance Comparison of LSTM and Transformer Model for Rainfall Data Imputation on Automatic Weather Station

Authors

DOI:

https://doi.org/10.22303/csrid-.18.3.2026.491-501

Keywords:

automatic weather station, imputation, rainfall, LSTM, transformer

Abstract

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..

References

World Meteorological Organization. (2024). Guide to instruments and methods of observation (WMO-No. 8). Geneva: WMO.

World Meteorological Organization. (2023). Guide to climatological practices. Geneva: WMO.

World Meteorological Organization. (2021). Manual on the WMO Integrated Global Observing System: Annex VIII to the WMO Technical Regulations. Geneva: WMO.

Calvin, K., Dasgupta, D., Krinner, G., Mukherji, A., Thorne, P. W., Trisos, C., et al. (2023). Climate Change 2023: Synthesis Report. Geneva: Intergovernmental Panel on Climate Change. https://doi.org/10.59327/IPCC/AR6-9789291691647.001

Little, R. J. A., & Rubin, D. B. (2019). Statistical analysis with missing data (3rd ed.). Hoboken, NJ: Wiley.

Alejo-Sanchez, L. E., Márquez-Grajales, A., Salas-Martínez, F., Franco-Arcega, A., López-Morales, V., Acevedo-Sandoval, O. A., et al. (2025). Missing data imputation of climate time series: A review. MethodsX, 15, 103455. https://doi.org/10.1016/j.mex.2025.103455

Addi, M., Gyasi-Agyei, Y., Obuobie, E., & Amekudzi, L. K. (2022). Evaluation of imputation techniques for infilling missing daily rainfall records on river basins in Ghana. Hydrological Sciences Journal, 67(4), 613-627. https://doi.org/10.1080/02626667.2022.2030868

Wangwongchai, A., Waqas, M., Dechpichai, P., Hlaing, P. T., Ahmad, S., & Humphries, U. W. (2023). Imputation of missing daily rainfall data: A comparison between artificial intelligence and statistical techniques. MethodsX, 11, 102459. https://doi.org/10.1016/j.mex.2023.102459

Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735-1780.

Zhang, Y., Ragettli, S., Molnar, P., Fink, O., & Peleg, N. (2022). Generalization of an encoder-decoder LSTM model for flood prediction in ungauged catchments. Journal of Hydrology, 614, 128577.

Khairunnisa, A., Sartono, B., & Aidi, M. N. (2025). Missing data imputation for LSTM-based flood early warning system in Jakarta. International Research Journal of Innovations in Engineering and Technology, 9(6), 142-148. https://doi.org/10.47001/irjiet/2025.906018

Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30.

Lim, B., Arık, S. Ö., Loeff, N., & Pfister, T. (2021). Temporal Fusion Transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting, 37(4), 1748-1764. https://doi.org/10.1016/j.ijforecast.2021.03.012

Zerveas, G., Jayaraman, S., Patel, D., Bhamidipaty, A., & Eickhoff, C. (2021). A Transformer-based framework for multivariate time series representation learning. Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2114-2124. https://doi.org/10.1145/3447548.3467401

Du, W., Wang, J., Qian, L., Yang, Y., Ibrahim, Z., Liu, F., et al. (2024). TSI-Bench: Benchmarking time series imputation. arXiv:2406.12747.

Atmaca, K., & Yenilmez, İ. (2024). RNNs and Transformer model in case of incomplete time series. International Applied Statistics Congress 2024, Istanbul, Turkey.

Ahn, H., Sun, K., & Kim, K. P. (2022). Comparison of missing data imputation methods in time series forecasting. Computers, Materials & Continua, 70(1), 767-779. https://doi.org/10.32604/cmc.2022.019369

Alruhaymi, A. Z., & Kim, C. J. (2021). Study on the missing data mechanisms and imputation methods. Open Journal of Statistics, 11(4), 477-492. https://doi.org/10.4236/ojs.2021.114030

Alwateer, M., Atlam, E.-S., El-Raouf, M. M. A., Ghoneim, O. A., & Gad, I. (2024). Missing data imputation: A comprehensive review. Journal of Computer and Communications, 12(11), 53-75. https://doi.org/10.4236/jcc.2024.1211004

Li, C., Ren, X., & Zhao, G. (2023). Machine-learning-based imputation method for filling missing values in ground meteorological observation data. Algorithms, 16(9), 422. https://doi.org/10.3390/a16090422

Downloads

Published

2026-09-14

How to Cite

Perfomance Comparison of LSTM and Transformer Model for Rainfall Data Imputation on Automatic Weather Station . (2026). CSRID (Computer Science Research and Its Development Journal), 18(3), 491-501. https://doi.org/10.22303/csrid-.18.3.2026.491-501

Similar Articles

You may also start an advanced similarity search for this article.