Forecasting Monthly Rainfall Using ANN and RNN Models: Case Study Batu Pahat, KLIA Sepang, Kuala Krai and Kuala Terengganu, Malaysia
DOI:
https://doi.org/10.11113/mjfas.v21n4.4364Keywords:
Rainfall, forecast, time series, artificial neural network, recurrent neural networkAbstract
Accurate rainfall forecasting is vital for a country’s preparedness in managing natural disasters caused by extreme weather, especially in Malaysia, which experiences catastrophic floods annually. This study focuses on forecasting rainfall in Batu Pahat, Kuala Krai, KLIA Sepang, and Kuala Terengganu - areas that have been severely affected by flooding in recent years. Two of the stations are prone to seasonal monsoon floods, while the others frequently experience flash floods. Analysing rainfall patterns in these areas is essential to evaluate how accurately forecasting models can perform across different regions. In this study, Artificial Neural Network (ANN) and Recurrent Neural Network (RNN) models were applied to monthly rainfall data from 1999 to 2021. For in-sample performance, RNN outperformed ANN at Batu Pahat and KLIA Sepang, while ANN performed slightly better at Kuala Krai and Kuala Terengganu, although the error differences were minor. This indicates that while ANN may fit certain patterns better, RNN generally showed more consistent accuracy. For out-of-sample forecasts, RNN achieved lower error measurements across most stations due to its ability to capture temporal dependencies in sequential data. Therefore, RNN presents a more robust model for rainfall forecasting, supporting the government’s efforts to mitigate flood risks.
References
Buslima, F. S., Omar, R. C., Jamaluddin, T. A., & Taha, H. (2018). Flood and flash flood geo-hazards in Malaysia. International Journal of Engineering and Technology, 7(4), 760–764.
Department of Statistics Malaysia. (2023). Special report on impact of floods in Malaysia (2022). https://www.dosm.gov.my/uploads/release-content/file_20230223141129.pdf
Department of Statistics Malaysia. (2024). Special report on impact of floods in Malaysia (2023). https://www.dosm.gov.my/portal-main/release-content/special-report-on-impact-of-floods-in-malaysia
Alias, E. (2025). November 2024 flood – How extreme it is and why? UTM News Hub. https://news.utm.my/2025/01/november-2024-flood-how-extreme-it-is-and-why
Malaysian Insight. (2023). New projection model will help fight flooding, says minister. https://www.themalaysianinsight.com/s/433802
Brunner, M. I., Slater, L., Tallaksen, L. M., & Clark, M. (2021). Challenges in modeling and predicting floods and droughts: A review. Wiley Interdisciplinary Reviews: Water, 8(3), e1520.
Geetha, A., & Nasira, G. M. (2016). Time-series modelling and forecasting: Modelling of rainfall prediction using ARIMA model. International Journal of Society Systems Science, 8(4), 361–372.
Bari, S. H., Rahman, M. T., Hussain, M. M., & Ray, S. (2015). Forecasting monthly precipitation in Sylhet city using ARIMA model. Civil and Environmental Research, 7 (1), 69–77.
Dayal, D., Swain, S., Gautam, A. K., Palmate, S. S., Pandey, A., & Mishra, S. K. (2019). Development of ARIMA model for monthly rainfall forecasting over an Indian River Basin. In World Environmental and Water Resources Congress 2019 (pp. 264–271). American Society of Civil Engineers.
Masum, M. H., Islam, R., Hossen, M. A., & Akhie, A. A. (2022). Time series prediction of rainfall and temperature trend using ARIMA model. Journal of Scientific Research, 14(1), 215–227.
Wang, H. R., Wang, C., Lin, X., & Kang, J. (2014). An improved ARIMA model for precipitation simulations. Non-linear Processes in Geophysics, 21(6), 1159–1168.
Ardabili, S., Mosavi, A., Dehghani, M., & Várkonyi-Kóczy, A. R. (2019). Deep learning and machine learning in hydrological processes climate change and earth systems a systematic review. In International Conference on Global Research and Education (pp. 52–62). Springer.
Nayak, D. R., Mahapatra, A., & Mishra, P. (2013). A survey on rainfall prediction using artificial neural network. International Journal of Computer Applications, 72(16), 32–40.
Hong, W. C. (2008). Rainfall forecasting by technological machine learning models. Applied Mathematics and Computation, 200(1), 41–57.
Khairudin, N. B. M., Mustapha, N. B., Aris, T. N. B. M., & Zolkepli, M. B. (2020). Comparison of machine learning models for rainfall forecasting. In 2020 International Conference on Computer Science and Its Application in Agriculture (ICOSICA) (pp. 1–5). IEEE.
Thakur, N., Karmakar, S., & Soni, S. (2021). Rainfall forecasting using various artificial neural network techniques—A review. International Journal of Scientific Research in Computer Science, Engineering and Information Technology, 7(3), 506–526.
Dwivedi, D. K., Kelaiya, J. H., & Sharma, G. R. (2019). Forecasting monthly rainfall using autoregressive integrated moving average model (ARIMA) and artificial neural network (ANN) model: A case study of Junagadh, Gujarat, India. Journal of Applied & Natural Science, 11(1).
Grover, R., Sharma, S., & Bajaj, P. (2024). Analysis on temporal variability of monsoon rainfall using ARIMA Model and ANN-LSTM. https://doi.org/10.21203/rs.3.rs-3975791/v1
Jafarian-Namin, S., Shishebori, D., & Goli, A. (2024). Analyzing and predicting the monthly temperature of Tehran using ARIMA model, artificial neural network, and its improved variant. Journal of Applied Research on Industrial Engineering, 11(1), 76–92.
Bergen, K. J., Johnson, P. A., de Hoop, M. V., & Beroza, G. C. (2019). Machine learning for data-driven discovery in solid Earth geoscience. Science, 363(6433), eaau0323.
Ponnamperuma, N., & Rajapakse, L. (2021). Comparison of time series forecast models for rainfall and drought prediction. In 2021 Moratuwa Engineering Research Conference (MERCon) (pp. 626–631). IEEE.
Ng, Y. N., Lim, H. Y., Cham, Y. C., Bakar, M. A. A., & Ariff, N. M. (2024). Comparison between LSTM, GRU and VARIMA in forecasting of air quality time series data. Malaysian Journal of Fundamental and Applied Sciences, 20(6), 1248–1260.
Ridwan, W. M., Sapitang, M., Aziz, A., Kushiar, K. F., Ahmed, A. N., & El-Shafie, A. (2021). Rainfall forecasting model using machine learning methods: Case study Terengganu, Malaysia. Ain Shams Engineering Journal, 12(2), 1651–1663.
Kumar, V., Kedam, N., Kisi, O., Alsulamy, S., Khedher, K. M., & Salem, M. A. (2024). A comparative study of machine learning models for daily and weekly rainfall forecasting. Water Resources Management, 1–20.
Barrera-Animas, A. Y., Oyedele, L. O., Bilal, M., Akinosho, T. D., Delgado, J. M. D., & Akanbi, L. A. (2022). Rainfall prediction: A comparative analysis of modern machine learning algorithms for time-series forecasting. Machine Learning with Applications, 7, 100204.
Apaydin, H., Feizi, H., Sattari, M. T., Colak, M. S., Shamshirband, S., & Chau, K. W. (2020). Comparative analysis of recurrent neural network architectures for reservoir inflow forecasting. Water, 12(5), 1500.
Pang, Z., Niu, F., & O’Neill, Z. (2020). Solar radiation prediction using recurrent neural network and artificial neural network: A case study with comparisons. Renewable Energy, 156, 279–289.
Khan, M., Khan, A. U., Khan, J., Khan, S., Haleem, K., & Khan, F. A. (2023). Streamflow forecasting for the Hunza river basin using ANN, RNN, and ANFIS models. Water Practice & Technology, 18(5), 981–993.
Patil, R. R., Kumar, S., & Rani, R. (2022). Comparison of artificial intelligence algorithms in plant disease prediction. Revue d'Intelligence Artificielle, 36(2).
Muhammad, M., Ibrahim, Q. A. Q., Ghani, M. S. M., Jemali, N., & Awang, N. R. (2021). Spatio-temporal analysis of rainfall data in Kuala Krai Kelantan. In IOP Conference Series: Earth and Environmental Science, 842 (1), 012023. IOP Publishing.
Ping, S. T. K., & Ibrahim, R. (2023). Adaptation strategies through aqua architecture for mitigating floods against future rising sea levels in Kuala Terengganu. In International Architecture Postgraduate Conference (IAPC2023) (p. 185).
Razi, M. A. M., Adnan, M. S., Abustan, M. S. H., Uma, M. H. A., Anuar, N. D., & Jamal, M. H. (2023). Flood modelling at Bandar Batu Pahat, Johor using HEC-RAS software. In IOP Conference Series: Earth and Environmental Science, 1205(1), 012023. IOP Publishing.
Fuad, S. N. M., Shafii, H., Wee, S. T., Mohamed, S., Sarpin, N., & Chen, G. K. (2023). Faktor-faktor yang menyumbang kepada bencana banjir di kawasan Taman Nira, Batu Pahat, Johor. Research in Management of Technology and Business, 4(1), 1249–1266.
Lacombe, L. (2020). Hybrid ANN and RNN to forecast retail sales [Bachelor Thesis Economics and Operations Research]. Erasmus School of Economics, Erasmus Universiteit Rotterdam.
Zhang, G., Patuwo, B. E., & Hu, M. Y. (1998). Forecasting with artificial neural networks: The state of the art. International Journal of Forecasting, 14(1), 35–62.
Haykin, S. (2009). Neural networks and learning machines (3rd ed.). Pearson Education India.
Mahata, S., Harsh, P., & Shekher, V. (2024). Comparative study of time-series forecasting models for wind power generation in Gujarat, India. e-Prime-Advances in Electrical Engineering, Electronics and Energy, 8, 100511.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Siti Rohani Mohd Nor, Suffi

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.














