Cascading Models of CNN and GRU with Autoencoder Loss for Precipitation Forecast in Thailand

Main Article Content

Fuenglada Manokij
Peerapon Vateekul
Kanoksri Sarinnapakorn


It is a crucial task to accurately forecast precipitation, especially rainfall in Thailand, since it relates to flood prevention and agricultural planning. In our prior work, we have presented a model based on deep learning approach; however, its performance is still limited due to two main issues. First, there is an imbalance issue, where most rainfall is zero or no rain because Thailand has short rainy season. Second, predicted rainfall is still underestimated since moderate and heavy rainfall cases barely occurs. In this paper, we propose an enhanced deep learning model to forecast rainfall in Thailand. Our model is a cascading of CNN and GRU along with exogenous variables, i.e., temperature, pressure, and humidity. There are two stages in our model. First, CNN is specialized for classifying rain and non-rain events. In this stage, an imbalanced issue is alleviated by applying “focal loss”. Second, GRU is responsible for forecasting rainfall. Its predicted range is lifted using “autoencoder loss”. The experiment was conducted on hourly rainfall dataset between 2012 and 2018 obtained from a public government sector in Thailand. The results show that our enhanced model outperforms ARIMA and CNN-GRU in terms on RMSE of most regions in Thailand.

Article Details

How to Cite
F. Manokij, P. Vateekul, and K. Sarinnapakorn, “Cascading Models of CNN and GRU with Autoencoder Loss for Precipitation Forecast in Thailand”, ECTI-CIT Transactions, vol. 15, no. 3, pp. 333–346, Nov. 2021.
Research Article


S. Sooktawee and G. Rajchakit, "Development simulation of an unseasonal heavy rainfall event over southern Thailand by WRFROMS coupling model," International Journal, vol. 18, no. 65, pp. 55-63, 2020.

M. Murat, I. Malinowska, M. Gos, and J. Krzyszczak, “Forecasting daily meteorological time series using

ARIMA and regression models,” International agrophysics, vol. 32, no. 2, pp. 253-264, 2018.

S. Wang, J. Feng, and G. Liu, "Application of seasonal time series model in the precipitation forecast," Mathematical and Computer Modelling, vol. 58, no. 3-4, pp. 677-683, 2013.

R. Mittelman, B. Kuipers, S. Savarese, and H. Lee, "Structured recurrent temporal restricted boltzmann

machines," in International Conference on Machine Learning, 2014, pp. 1647-1655.

A. S. Cofino, R. Cano Trueba, C. M. Sordo, and J. M. Gutiérrez Llorente, "Bayesian networks for probabilistic weather prediction," 2002.

S. Cramer, M. Kampouridis, A. A. Freitas, and A. K. Alexandridis, "An extensive evaluation of seven machine learning methods for rainfall prediction in weather derivatives," Expert Systems with Applications, vol. 85, pp. 169-181, 2017.

N. Q. Hung, M. S. Babel, S. Weesakul, and N. Tripathi, "An artificial neural network model for rainfall forecasting in Bangkok, Thailand," Hydrology & Earth System Sciences, vol. 13, no. 8, 2009.

J. N. Liu, Y. Hu, J. J. You, and P. W. Chan, "Deep neural network-based feature representation for weather forecasting," in Proceedings on the International Conference on Artificial Intelligence (ICAI), 2014: The Steering Committee of The World

Congress in Computer Science, Computer Engineering and Applied Computing (WorldComp).

K. Boonyuen, P. Kaewprapha, and P. Srivihok, "Daily rainfall forecast model from satellite image using convolution neural network," in 2018 International Conference on Information Technology (InCIT), 2018: IEEE, pp. 1-7.

K. Boonyuen, P. Kaewprapha, U. Weesakul, and P. Srivihok, "Convolutional neural network inception-v3: a machine learning approach for leveling short-range rainfall forecast model from satellite image," in International Conference on Swarm Intelligence, 2019: Springer, pp. 105-115.

E. Hernández, V. Sanchez-Anguix, V. Julian, J. Palanca, and N. Duque, "Rainfall prediction: A deep learning approach," in International Conference on Hybrid Artificial Intelligence Systems, 2016: Springer, pp. 151-162.

M. Qiu, P. Zhao, J. Huang, X. Shi, X. Wang and W. Chu, "A short-term rainfall prediction model using multi-task convolutional neural networks," in 2017 IEEE International Conference on Data Mining (ICDM), 2017: IEEE, pp. 395-404.

F. Manokij, K. Sarinnapakorn, and P. Vateekul, "Forecasting Thailand’s Precipitation with Cascading Model of CNN and GRU," in 2019 11th International Conference on Information Technology and Electrical Engineering (ICITEE), 2019: IEEE, pp. 1-6.

W. Kliengchuay, A. Cooper Meeyai, S. Worakhunpiset, and K. Tantrakarnapa, "Relationships between meteorological parameters and particulate matter in Mae Hong Son province, Thailand," International Journal of Environmental Research and Public Health, vol. 15, no. 12, p. 2801, 2018.

F. J. J. Joseph, "IoT Based Weather Monitoring System for Effective Analytics," International Journal of Engineering and Advanced Technology, vol. 8, no. 4, pp. 311-315, 2019.

F. J. J. Joseph, "IOT Based Unified Approach To Predict Particulate Matter Pollution In Thailand."

T. Kieu, B. Yang, C. Guo, and C. S. Jensen, "Outlier Detection for Time Series with Recurrent Autoencoder Ensembles," in IJCAI, 2019, pp. 2725-2732.

Y. Xia, X. Cao, F. Wen, G. Hua, and J. Sun, "Learning discriminative reconstructions for unsupervised outlier removal," in Proceedings of the IEEE International Conference on Computer Vision, 2015, pp. 1511-1519.

P. Malhotra, A. Ramakrishnan, G. Anand, L. Vig, P. Agarwal, and G. Shroff, "LSTM-based encoder-decoder for multi-sensor anomaly detection," arXiv preprint arXiv:1607.00148, 2016.

Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, "Gradient-based learning applied to document recognition," Proceedings of the IEEE, vol. 86, no. 11, pp. 2278-2324, 1998.

J. Chung, C. Gulcehre, K. Cho, and Y. Bengio, "Empirical evaluation of gated recurrent neural networks on sequence modeling," arXiv preprint arXiv:1412.3555, 2014.

T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár, "Focal loss for dense object detection," in Proceedings of the IEEE international conference on computer vision, 2017, pp. 2980-2988.

G. S. Babu, P. Zhao, and X.-L. Li, "Deep convolutional neural network based regression approach for estimation of remaining useful life," in International conference on database systems for advanced applications, 2016: Springer, pp. 214-228.

K. Cho et al., "Learning phrase representations using RNN encoder-decoder for statistical machine translation," arXiv preprint arXiv:1406.1078, 2014.

N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, "Dropout: a simple way to prevent neural networks from overfitting," The journal of machine learning research, vol. 15, no. 1, pp. 1929-1958, 2014.

D. P. Kingma and J. Ba, "Adam: A method for stochastic optimization," arXiv preprint arXiv:1412.6980, 2014.