Perbandingan Long Short Term Memory (LSTM) dan Gated Recurrent Unit (GRU) Untuk Memprediksi Curah Hujan

 (*)M Devid Alam Carnegie Mail (IIB Darmajaya, Lampung, Indonesia)
 Chairani Chairani (IIB Darmajaya, Lampung, —)

(*) Corresponding Author

Submitted: May 28, 2023; Published: July 23, 2023


One of the impacts of the threat caused by heavy rain is flooding, which can have negative effects on human life. There are many factors that contribute to heavy rain, and predicting the intensity of rainfall issued by BMKG (Meteorology, Climatology, and Geophysics Agency) is an initial solution for planning and taking actions to mitigate the impacts of natural disasters. Machine learning methods can be used to predict weather parameters, especially time series rainfall. Deep learning, a branch of machine learning that can understand patterns and make weather parameter predictions with high accuracy, includes several algorithms commonly used for analyzing and predicting weather parameters, namely Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU). This research aims to compare both algorithms and determine which one performs best in predicting rainfall at the North Lampung Geophysics Station. From the evaluation results with RMSE (Root Mean Square Error) value of 16.81, MSE (Mean Square Error) value of 282.55, and MAD (Mean Absolute Deviation) value of 10.43, it is known that the LSTM model 1 with a dataset split of 7:3 has the best performance in predicting rainfall. As for the rain prediction, the GRU model 1 with a dataset split of 7:3 performs best with an accuracy value of 62%, precision of 58%, recall of 66%, and f1score of 62%.


BMKG; LSTM; GRU; Rainfall; Prediction

Full Text:


Article Metrics

Abstract view : 776 times
PDF - 676 times


BNPB, IRBI : Indeks Risiko Bencana Indonesia, Tahun 2021. Jakarta: Pusat Data, Informasi dan Komunikasi Kebencanaan Badan Nasional Penanggulangan Bencana, 2021.

T. Astuti Nuraini et al., “Pengembangan Model HyBMG 2.07 Untuk Prediksi Iklim di Indonesia Dengan Menggunakan Data Tropical Rainfall Measuring Mission (TRMM),” Jurnal Meteorologi dan Geofisika, vol. 20, pp. 101–112, Jun. 2019.

R. Atika, A. Fariza, and A. R. Barakbah, “Forecast Rainfall Data Time Series Using Multi-Attribute Long Short Term Memory,” R. Atika, A. Fariza, and A. R. Barakbah, Eds., Surabaya: IEEE, Sep. 2019. doi: 10.1109/ELECSYM.2019.8901590.

M. Rizki, S. Basuki, and Y. Azhar, “Implementasi Deep Learning Menggunakan Arsitektur Long Short Term Memory Untuk Prediksi Curah Hujan Kota Malang,” REPOSITOR, vol. 2, no. 3, pp. 331–338, Mar. 2020.

T. Lattifia, P. Wira Buana, N. Kadek, and D. Rusjayanthi, “Model Prediksi Cuaca Menggunakan Metode LSTM,” JITTER-Jurnal Ilmiah Teknologi dan Komputer, vol. 3, no. 1, Apr. 2022.

A. Hanifa, S. A. Fauzan, M. Hikal, and M. B. Ashfiya, “Perbandingan Metode LSTM dan GRU (RNN) Untuk Klasifikasi Berita Palsu Berbahasa Indonesia,” Dinamika Rekayasa, vol. 17, no. 1, pp. 33–39, 2021, doi: 10.20884/1.DR.2021.17.1.436.

M. A. Sholeh and R. Hidayat, “Perbandingan Model LSTM dan GRU Untuk Memprediksi Harga Minyak Goreng di Indonesia,” Edusaintek : Jurnal Pendidikan, Sains dan Teknologi, vol. 9, no. 3, pp. 800–811, 2022, doi: 10.47668/edusaintek.v9i3.593.

Y. Karyadi and H. Santoso, “Prediksi Kualitas Udara Dengan Metoda LSTM, Bidirectional LSTM, dan GRU,” Jurnal Teknik Informatika dan Sistem Informasi, vol. 9, no. 1, pp. 671–684, 2022.

K. E. ArunKumar, D. V. Kalaga, C. M. S. Kumar, M. Kawaji, and T. M. Brenza, “Forecasting of COVID-19 using deep layer Recurrent Neural Networks (RNNs) with Gated Recurrent Units (GRUs) and Long Short-Term Memory (LSTM) cells,” Chaos Solitons Fractals, vol. 146, May 2021, doi: 10.1016/j.chaos.2021.110861.

P. T. Yamak, L. Yujian, and P. K. Gadosey, “A comparison between ARIMA, LSTM, and GRU for time series forecasting,” in ACM International Conference Proceeding Series, Association for Computing Machinery, Dec. 2019, pp. 49–55. doi: 10.1145/3377713.3377722.

J. M. Han, Y. Q. Ang, A. Malkawi, and H. W. Samuelson, “Using recurrent neural networks for localized weather prediction with combined use of public airport data and on-site measurements,” Build Environ, vol. 192, Apr. 2021, doi: 10.1016/j.buildenv.2021.107601.

S. Nosouhian, F. Nosouhian, and A. K. Khoshouei, “A review of recurrent neural network architecture for sequence learning: Comparison between LSTM and GRU,” 2021, doi: 10.20944/preprints202107.0252.v1.

E. Aldrian and R. D. Susanto, “Identification Of Three Dominant Rainfall Regions Within Indonesia and Their Relationship to Sea Surface Temperature,” International Journal of Climatology, vol. 23, no. 12, pp. 1435–1452, Oct. 2003, doi: 10.1002/joc.950.

S. Hochreiter and S. Jurgen, “Long Short-Term Memory,” Neural Comput, vol. 9, no. 8, pp. 1735–1780, 1997, doi: 10.1162/neco.1997.9.8.1735.

M. Phi, “Illustrated Guide to LSTM’s and GRU’s: A step by step explanation,” (diakses pada 29 Agustus 2022), Sep. 25, 2018.

K. Cho, B. van Merrienboer, D. Bahdanau, and Y. Bengio, “On the Properties of Neural Machine Translation: Encoder-Decoder Approaches,” Proceedings of SSST-8, Eighth Workshop on Syntax, Semantics and Structure in Statistical Translation, Sep. 2014, [Online]. Available:

J. Han, M. Kamber, and J. Pei, “Data Mining. Concepts and Techniques, 3rd Edition (The Morgan Kaufmann Series in Data Management Systems),” 2011.

I. H. Witten, E. Frank, and M. A. Hall, “Data Mining : Practical Machine Learning Tools and Technique. 3rd edition,” Burlington, 2011.

E. Supriyadi, “Prediksi Parameter Cuaca Menggunakan Deep Learning Long-Short Term Memory (LSTM),” Jurnal Meteorologi dan Geofisika, vol. 21, pp. 55–67, Oct. 2019.

C. Sammut and G. Webb, “Encyclopedia of Machine Learning,” Encyclopedia of Machine Learning. pp. 140–259, 2011. doi: 10.1007/978-0-387-30164-8.

Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Perbandingan Long Short Term Memory (LSTM) dan Gated Recurrent Unit (GRU) Untuk Memprediksi Curah Hujan


  • There are currently no refbacks.


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

STMIK Budi Darma
Secretariat: Sisingamangaraja No. 338 Telp 061-7875998

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