Sunspot Number Prediction Using Gated Recurrent Unit (GRU) Algorithm

Unix Izyah Arfianti(1), Dian Candra Rini Novitasari(2*), Nanang Widodo(3), Moh. Hafiyusholeh(4), Wika Dianita Utami(5)

(1) Department of Mathematics, UIN Sunan Ampel, Surabaya
(2) Department of Mathematics, UIN Sunan Ampel, Surabaya
(3) Balai Pengamatan Antariksa dan Atmosfer, Pasuruan
(4) Department of Mathematics, UIN Sunan Ampel, Surabaya
(5) Department of Mathematics, UIN Sunan Ampel, Surabaya
(*) Corresponding Author


Sunspot is an area on photosphere layer which is dark-colored. Sunspot is very important to be researched because sunspot is affected by sunspot numbers, which present the level of solar activity. This research was conducted to make prediction on sunspot numbers using Gated Recurrent Unit (GRU) algorithm. The work principle of GRU is similar to Long short-term Memory (LSTM) method: the information from the previous memory is processed through two gates, that is update gate and reset gate, then the output generated will be input for the next process. The purpose of predicting sunspot numbers was to find out the information of sunspot numbers in the future, so that if there is a significant increase in sunspot numbers, it can inform other physical consequences that may be caused. The data used was the data of monthly sunspot numbers obtained from SILSO website. The data division and parameters used were based on the results of the trials resulted in the smallest MAPE value. The smallest MAPE value obtained from the prediction was 7.171% with 70% training data, 30% testing data, 150 hidden layer, 32 batch size, 100 learning rate drop.



prediction; sunspot numbers; time series; GRU; LSTM

Full Text:



[1] S. Chattopadhyay, D. Jhajharia, and G. Chattopadhyay, “Trend Estimation and Univariate Forecast of The Sunspot Numbers: Development and Comparison of ARMA, ARIMA and Autoregressive Neural Network Models,” Comptes Rendus - Geosci., vol. 343, no. 7, pp. 433–442, 2011, [Online]. Available:

[2] D. C. R. Novitasari, N. Ardhiyah, and N. Widodo, “Flare Identification by Forecasting Sunspot Numbers Using Fuzzy Time Series Markov Chain Model,” Proc. - 2019 Int. Semin. Intell. Technol. Its Appl. ISITIA 2019, pp. 387–392, 2019, [Online]. Available:

[3] S. Suwanto, “Prediksi Bilangan Sunspot menggunakan Support Vector Regression (SVR),” 2019, [Online]. Available:

[4] H. I. Abdel-Rahman and B. A. Marzouk, “Statistical Method to Predict The Sunspots Number,” NRIAG J. Astron. Geophys., vol. 7, no. 2, pp. 175–179, 2018, [Online]. Available:

[5] R. P. Wardana, “Penerapan Model Gated Recurrent Unit untuk Peramalan Jumlah Penumpang Kereta Api di PT. KAI (PERSERO),” pp. 45–45, 2020, [Online]. Available:

[6] R. A. Saputra, “Prediksi Permintaan Kargo pada Cargo Service Center Tangerang City Menggunakan Metode Gated Recurrent Unit,” 2020.

[7] L. L. Fu Rui, Zhang Zuo, “Using LSTM and GRU Neural Network Methods for Traffic Flow Prediction,” 31st Youth Academic Annual Conference of Chinese Association of Automation, 2016.

[8] A. S. Prabowo, A. Sihabuddin, and A. SN, “Adaptive Moment Estimation On Deep Belief Network For Rupiah Currency Forecasting,” IJCCS (Indonesian J. Comput. Cybern. Syst., vol. 13, no. 1, p. 31, 2019, [Online]. Available:

[9] T. Dozat, “Incorporating Nesterov Momentum into Adam,” ICLR Work., no. 1, pp. 2013–2016, 2016, [Online]. Available:

[10] I. K. M. Jais, A. R. Ismail, and S. Q. Nisa, “Adam Optimization Algorithm for Wide and Deep Neural Network,” Knowl. Eng. Data Sci, vol. 2, no. 1, pp. 41–46, 2019, [Online]. Available:

[11] N. Mohamad Ansor, Z. S. Hamidi, and N. N. M. Shariff, “The Impact on Climate Change Due to the Effect of Global Electromagnetic Waves of Solar Flare and Coronal Mass Ejections (CMEs) Phenomena,” J. Phys. Conf. Ser., vol. 1298, no. 1, 2019, [Online]. Available:

[12] D. A. Nasution, H. H. Khotimah, and N. Chamidah, “Perbandingan Normalisasi Data untuk Klasifikasi Wine Menggunakan Algoritma K-NN,” Comput. Eng. Sci. Syst. J., vol. 4, no. 1, p. 78, 2019, [Online]. Available:

[13] J. Sola and J. Sevilla, “Importance of Input Data Normalization for the Application of Neural Networks to Complex Industrial Problems,” IEEE Trans. Nucl. Sci., vol. 44, no. 3 PART 3, pp. 1464–1468, 1997, doi:

[14] K. Cho et al., “Learning Phrase Representations Using RNN Encoder-Decoder for Statistical Machine Translation,” EMNLP 2014 - 2014 Conf. Empir. Methods Nat. Lang. Process. Proc. Conf., pp. 1724–1734, 2014, [Online]. Available:

[15] B. Athiwaratkun and J. W. Stokes, “Malware Classification with LSTM and GRU Language Models and A Character-Level CNN,” in 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2017, pp. 2482–2486, [Online]. Available:

[16] K. A. Althelaya, E. S. M. El-Alfy, and S. Mohammed, “Stock Market Forecast Using Multivariate Analysis with Bidirectional and Stacked (LSTM, GRU),” 21st Saudi Comput. Soc. Natl. Comput. Conf. NCC 2018, pp. 1–7, 2018, [Online]. Available:

[17] J. Tzeng, Y. R. Lai, M. L. Lin, Y. H. Lin, and Y. C. Shih, “Improve the LSTM and GRU model for small training data by wavelet transformation,” Proc. Int. Jt. Conf. Neural Networks, pp. 2–7, 2020, doi: 10.1109/IJCNN48605.2020.9206840.

[18] S. Kumar, L. Hussain, S. Banarjee, and M. Reza, “Energy Load Forecasting using Deep Learning Approach-LSTM and GRU in Spark Cluster,” in Proceedings of 5th International Conference on Emerging Applications of Information Technology, EAIT 2018, 2018, pp. 1–4, [Online]. Available:

[19] B. Yue, J. Fu, and J. Liang, “Residual Recurrent Neural Networks for Learning Sequential Representations,” Inf., vol. 9, no. 3, 2018, [Online]. Available:

[20] Q. Tao, F. Liu, Y. Li, and D. Sidorov, “Air Pollution Forecasting Using A Deep Learning Model Based on 1D Convnets and Bidirectional GRU,” IEEE Access, vol. 7, pp. 76690–76698, 2019, [Online]. Available:

[21] Y. Gao and D. Glowacka, “Deep Gate Recurrent Neural Network,” in Asian conference on machine learning, 2016, pp. 350–365, [Online]. Available:

[22] D. Z. Haq et al., “Long Short-Term Memory Algorithm for Rainfall Prediction Based on El-Nino and IOD Data,” ScienceDirect, vol. 00, no. 2019, 2020.

[23] D. P. Kingma and J. L. Ba, “Adam: A method for Stochastic Optimization,” in 3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings, 2015, pp. 1–15, [Online]. Available:

[24] Z. Chang, Y. Zhang, and W. Chen, “Electricity Price Prediction Based on Hybrid Model of ADAM Optimized LSTM Neural Network and Wavelet Transform,” Energy, vol. 187, p. 115804, 2019, [Online]. Available:

[25] Z. Chang, Y. Zhang, and W. Chen, “Effective Adam-Optimized LSTM Neural Network for Electricity Price Forecasting,” Proc. IEEE Int. Conf. Softw. Eng. Serv. Sci. ICSESS, vol. 2018-Novem, no. Figure 1, pp. 245–248, 2019, [Online]. Available:

[26] S. Ruder, “An Overview of Gradient Descent Optimization Algorithms,” pp. 1–14, 2016, [Online]. Available:

[27] E. Ogasawara, L. C. Martinez, D. De Oliveira, G. Zimbrão, G. L. Pappa, and M. Mattoso, “Adaptive Normalization: A Novel Data Normalization Approach for Non-Stationary Time Series,” in Proceedings of the International Joint Conference on Neural Networks, 2010, [Online]. Available:

[28] J. Tayman and D. A. Swanson, “On The Validity of MAPE as A Measure of Population Forecast Accuracy,” Popul. Res. Policy Rev., vol. 18, no. 4, pp. 299–322, 1999, [Online]. Available:

[29] J. W. Koo, S. W. Wong, G. Selvachandran, H. V. Long, and L. H. Son, “Prediction of Air Pollution Index in Kuala Lumpur using fuzzy time series and statistical models,” Air Qual. Atmos. Heal., vol. 13, no. 1, pp. 77–88, 2020, doi: 10.1007/s11869-019-00772-y.

[30] S. S. C. Ramasamy P and A. K. Yadav, “Wind Speed Prediction in The Mountainous Region of India Using An Artificial Neural Network Model,” Renewable Energy, 2015.

[31] S. Bouktif, A. Fiaz, A. Ouni, and M. A. Serhani, “Optimal deep learning LSTM model for electric load forecasting using feature selection and genetic algorithm: Comparison with machine learning approaches,” Energies, 2018.

[32] S. Suwanto and D. C. R. Novitasari, “Forecasting Solar Activities based on Sunspot Number Using Support Vector Regression (SVR),” JPSE (Journal Phys. Sci. Eng., vol. 5, no. 1, pp. 6–10, 2020, doi: 10.17977/um024v5i12020p006.

[33] S. Basu and M. Meckesheimer, “Automatic Outlier Detection for Time Series: An Application to Sensor Data,” Knowl. Inf. Syst., vol. 11, no. 2, pp. 137–154, 2007, [Online]. Available:

[34] S. Papadimitriou, H. Kitagawa, P. B. Gibbons, and C. Faloutsos, “LOCI: Fast Outlier Detection Using the Local Correlation Integral,” Proc. 19th Int. Conf. data Eng. (Cat. No. 03CH37405), pp. 315–326, 2003, [Online]. Available:

[35] D. She and M. Jia, “A BiGRU Method for Remaining Useful Life Prediction of Machinery,” Meas. J. Int. Meas. Confed., vol. 167, no. June 2020, p. 108277, 2021, [Online]. Available:


Article Metrics

Abstract views : 5109 | views : 3813


  • There are currently no refbacks.

Copyright (c) 2021 IJCCS (Indonesian Journal of Computing and Cybernetics Systems)

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

Copyright of :
IJCCS (Indonesian Journal of Computing and Cybernetics Systems)
ISSN 1978-1520 (print); ISSN 2460-7258 (online)
is a scientific journal the results of Computing
and Cybernetics Systems
A publication of IndoCEISS.
Gedung S1 Ruang 416 FMIPA UGM, Sekip Utara, Yogyakarta 55281
Fax: +62274 555133 |

View My Stats1
View My Stats2