CFP last date
28 February 2025
Reseach Article

A Comparative Study of Long Short-Term Memory and Gated Recurrent Units for Forecasting Rainfall: A Case Study of Nigeria

by Oguche Ajah, Abimbola H. Afolayan, Akintoba E. Akinwonmi
International Journal of Applied Information Systems
Foundation of Computer Science (FCS), NY, USA
Volume 12 - Number 46
Year of Publication: 2025
Authors: Oguche Ajah, Abimbola H. Afolayan, Akintoba E. Akinwonmi
10.5120/ijais2025451987

Oguche Ajah, Abimbola H. Afolayan, Akintoba E. Akinwonmi . A Comparative Study of Long Short-Term Memory and Gated Recurrent Units for Forecasting Rainfall: A Case Study of Nigeria. International Journal of Applied Information Systems. 12, 46 ( Jan 2025), 15-24. DOI=10.5120/ijais2025451987

@article{ 10.5120/ijais2025451987,
author = { Oguche Ajah, Abimbola H. Afolayan, Akintoba E. Akinwonmi },
title = { A Comparative Study of Long Short-Term Memory and Gated Recurrent Units for Forecasting Rainfall: A Case Study of Nigeria },
journal = { International Journal of Applied Information Systems },
issue_date = { Jan 2025 },
volume = { 12 },
number = { 46 },
month = { Jan },
year = { 2025 },
issn = { 2249-0868 },
pages = { 15-24 },
numpages = {9},
url = { https://www.ijais.org/archives/volume12/number46/a-comparative-study-of-long-short-term-memory-and-gated-recurrent-units-for-forecasting-rainfall-a-case-study-of-nigeria/ },
doi = { 10.5120/ijais2025451987 },
publisher = {Foundation of Computer Science (FCS), NY, USA},
address = {New York, USA}
}
%0 Journal Article
%1 2025-02-01T00:51:39.752176+05:30
%A Oguche Ajah
%A Abimbola H. Afolayan
%A Akintoba E. Akinwonmi
%T A Comparative Study of Long Short-Term Memory and Gated Recurrent Units for Forecasting Rainfall: A Case Study of Nigeria
%J International Journal of Applied Information Systems
%@ 2249-0868
%V 12
%N 46
%P 15-24
%D 2025
%I Foundation of Computer Science (FCS), NY, USA
Abstract

Heavy rainfall may trigger floods, destroying human life and the agricultural economy. Accurate rainfall forecasting is vital for mitigating the effects of severe flooding. This study compares deep supervised learning (DSL) algorithms for rainfall forecasting in Nigeria, using a large dataset from ECMWF archives that includes Kaduna, Bauchi, Kwara, Imo, Ondo, and Cross River states representing the six geopolitical zones in Nigeria. Critical attributes in the dataset include rainfall, relative humidity, temperature, dew point, surface pressure, and wind speed. Following meticulous preprocessing and outlier removal, feature engineering was done using Pearson correlation and Spearman rank to ensure the most important predictors were chosen. Two sophisticated models— Long Short-Term Memory (LSTM), and Gated Recurrent Unit (GRU) were developed, trained, and tested extensively. The models were assessed using a variety of metrics, including Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), R-squared, and Accuracy. The findings were impressive, with the GRU model surpassing the LSTM model with the average MSE, MAE, R-Square, RMSE, and Accuracy values of 3.0504, 1.1644, 0.7978, 1.7381, and 98.43%, respectively. These findings illustrate GRU's exceptional capacity to capture complicated patterns of rainfall data, making it an effective tool for meteorological forecasting.

References
  1. Alzubaidi, F., Zhang, J., Humaidi, A. J., Al-Dujaili, A., Duan, Y., Al-Shamma, O., Santamaría, J., Fadhel, M. A., Al-Amidie, M., & Farhan, L. (2021). Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. Journal of Big Data, 8(1), 53. https://doi.org/10.1186/s40537-021-00444-8
  2. Baig, F., Ali, L., Faiz, M. A., Chen, H., and Sherif, M. (2024). How accurate are the machine learning models in improving monthly rainfall prediction in hyper-arid environments,” Journal of Hydrology, vol. 633, https://doi.org/10.1016/j.jhydrol.2024.13
  3. Chhetri, M., Kumar, S., Roy, P.P., & Kim, B. (2020). Deep BLSTM-GRU Model for Monthly Rainfall Prediction: A Case Study of Simtokha, Bhutan. Remote. Sens., 12, 3174.
  4. Chung, J., Gulcehre, C., Cho, K., & Bengio, Y. (2014). Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555.
  5. Endalie, D., Haile, G., & Taye, W. (2022). The deep learning model for daily rainfall prediction: a case study of Jimma, Ethiopia. Water Supply, 22(3), 3448 doi: 10.2166/ws.2021.391
  6. Fahad, S., Su, F., Khan, S. U., Naeem, M. R., & Wei, K. (2023). Implementing a novel deep learning technique for rainfall forecasting via climatic variables: An approach via hierarchical clustering analysis. Science of The Total Environment, 854:1-9, 158760, http://dx.doi.org/10.1016/j.scitotenv.2022.158760
  7. Ganachari P. V, and Kumari, R., (2021), Machine Learning Based Rainfall Analysis. International Journal of Scientific Research in Science and Technology, 7(4), 208-212, doi: https://doi.org/10.32628/CSEIT217462
  8. Haq, D. Z., Novitasari, D. C. R., Hamid, A., Ulinnuha, N., Arnita, Farida, Y., Nugraheni, R. D., Nariswari, R., Ilham, Rohayani, H., Pramulya, R., Widjayanto, A. (2021). Long Short-Term Memory Algorithm for Rainfall Prediction Based on El-Nino and IOD Data. Procedia Computer Science, 179, 829–837.
  9. He, R., Zhang, L., & Chew, A. W. Z. (2024). Data-driven multi-step prediction and analysis of monthly rainfall using explainable deep learning. Expert Systems with Applications, 235, 121160. https://doi.org/10.1016/j.eswa.2023.121160
  10. Hochreiter, S., and Schmidhuber, J. (1997) “Long short-term memory,” Neural Computation, vol. 9(8), pp. 1735–1780.
  11. Khairudin, N.B.M, Mustapha, N.B., Aris, T.N.B.M. and 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), 2020. IEEE.
  12. Mahmood A., and Shrestha A. (2019), "Review of Deep Learning Algorithms and Architectures," in IEEE Access, vol. 7, pp. 53040-53065, 2019, doi: 10.1109/ACCESS.2019.2912200.
  13. Manokij, F., Sarinnapakorn, K., & Vateekul, P. (2019). Forecasting Thailand’s Precipitation with Cascading Model of CNN and GRU. 2019 11th International Conference on Information Technology and Electrical Engineering (ICITEE), 1-6
  14. Mungale, N., & Shinde, J. (2024). Rainfall Forecasting: A Comparative Analysis of Deep Learning and Machine Learning Models with Application to Environmental Data. International Journal of Intelligent Systems and Applications in Engineering, 12(12s), 380–393.
  15. Narejo S, Jawaid MM, Talpur S, Baloch R, Pasero EGA (2021). Multi-step rainfall forecasting using a deep learning approach. PeerJ Comput. Sci. 7:e514 DOI 10.7717/peerj-cs.514
  16. Ni, L., Wang, D., Singh, V. P., Wu, J., Wang, Y., Tao, Y., and Zhang, J. (2020). Streamflow and rainfall forecasting by two long short-term memory-based models. Journal of Hydrology, 583, 124296.
  17. Nugraha, Y.E., Ariawan, I., & Arifin, W.A. (2023). Weather forecast from time series data using LSTM algorithm. Jurnal Teknologi Informasi dan Komunikasi, 14(1), 144-152 doi:10.51903/jtikp.v14i1.531
  18. Nurrohman, H.F., Novitasari, D.C., Setiawan, F., Rochimah, Taufiq, A., & Hamid, A. (2022). Rainfall Prediction Using Gated Recurrent Unit Based on DMI and Nino3.4 Index. 2022 IEEE International Conference on Industry 4.0, Artificial Intelligence, and Communications Technology (IAICT), 191-196.
  19. Prakaash, A. S. K., Kalaivani, K. C., Rajheshwari, P., Dhanalakshmi, & Mohanaprakash, T. A. (2023). Revolutionizing Rain Prediction: Deep Learning-Powered TensorFlow Solution for Meteorology and Emergency Management. International Journal of Intelligent Systems and Applications in Engineering, 14(4), 844-852.
  20. Samad, A., Jain, P., Bhagyanidhi, S., Gautam, V., and Sarkar, K., (2021). An Approach for Rainfall Prediction Using Long Short-Term Memory Neural Network, IEEE 5th International Conference on Computing Communication and Automation (ICCCA) Galgotias University, Greater Noida, UP, India, pp. 190-195, 2021.
  21. Salehin, I., Talha, I.M., Mehedi Hasan, M., Dip, S.T., Saifuzzaman, M., & Moon, N.N. (2020). An Artificial Intelligence-Based Rainfall Prediction Using LSTM and Neural Network. 2020 IEEE International Women in Engineering (WIE) Conference on Electrical and Computer Engineering (WIECON-ECE), 5-8.
  22. Shiwei C., Adjei, C.O., Tian, W., nzo, B.O., Adu, E., Kedjanyi, G., & Darteh, O.F. (2021). Rainfall Forecasting in Sub-Sahara Africa-Ghana using LSTM Deep Learning Approach, International Journal of Engineering Research & Technology (IJERT), 10(03), 464-470.
  23. Sun, D., Wu, J., Huang, H., Wang, R., Liang, F., & Xinhua, H. (2021). Prediction of Short-Time Rainfall Based on Deep Learning. Mathematical Problems in Engineering, Hindawi, 1-8. https://doi.org/10.1155/2021/6664413
  24. Tuysuzoglu G, Birant K. U., and Birant D.(2023). “Rainfall prediction using an ensemble machine learning model based on K-Stars,” Sustainability, 15, 5889, 2023. https://doi.org/10.3390/su15075889
  25. Valavanidis A (2023), “Extreme Weather Events Exacerbated by the Global Impact of Climate Change: A Glimpse of the Future, if Climate Change Continues Unabated”, 2023. Retrieved from https://www.researchgate.net/publication/368468689
  26. Yang, S., Yu, X., & Zhou, Y. (2020). LSTM and GRU Neural Network Performance Comparison study: Take the Yelp review dataset as an example. In 2020 International Workshop on Electronic Communication and Artificial Intelligence (IWECAI) (pp. 98-101). IEEE.
  27. Zhang, X., Duan, B., He, S., Wu, X., & Zhao, D. (2022). A new precipitation forecast method based on CEEMD-WTD-GRU. Water Supply (2022) 22 (4): 4120–4132. https://doi.org/10.2166/ws.2022.037
Index Terms

Computer Science
Information Sciences

Keywords

Rainfall forecasting in Nigeria Deep Supervised Learning Algorithms Long Short-Term Memory Gated Recurrent Unit Evaluation Metrics