Prediction Active Case of Covid-19 with ERNN

ABSTRACT


A. INTRODUCTION
Everyone in the world has been fighting against SARS-CoV-2 or known as Covid-19 since the last two years, including The Indonesia Government. In South Kalimantan, Covid-19 was found for the first time in March 2020. The Government has made various efforts, such as imposing restrictions on activities and providing vaccines. However, the spread of Covid-19 still continues and tends to increase. The worst possibility can happen if the number of active cases soars but is not matched by the availability of facilities and personnel health. This can be avoided by making an action plan if it happens. And the careful planning requires an overview of the data on active cases that are positive for Covid-19. This overview can be obtained through prediction.
The use of predictions as a problem solution has often been done with various methods and algorithm. Comparison of neural networks with other various time series forecasting methods have been carried out in previous studies. Neural networks compare with Logistic Regression and Adaptive Neuro-Fuzzy Inference System (ANFIS) (Choubin, Khalighi-Sigaroodi, Malekian, & Kişi, 2016), with statistical method, namely ARIMA (Abdul & Ashour, 2018;Pal, Singh, & Dutta, 2015), with Exponential Smoothing (Aprianti, Permadi, & Rhomadhona, 2020). These researches show that neural networks better method than others. Discuss algorithm and technic of data mining in health field (Madadipouya, 2017) mentioned that artificial neural networks can handle nosy and uncertain data. This is supported by (Chen, 2018) which states that neural networks can be used to solve some problems because it has powerful prediction.
In Economic Field, ERNN has been compared with Multilayer Perceptron (MLP), Radial Basis Function Neural Network (RBFNN), Jordan Neural Network (JRNN) to predict stock price to Bank of Palestine (Altelbany & Abualhussein, 2021), with Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) to predict stock price of IAM.PA and ORA.PA (Berradi, Lazaar, Omara, & Mahboub, 2020). The result of comparing methods in economic data show that ERNN is the best method. In meteorological field, ERNN also has been compared with Feed Forward Neural Network (FFNN), Cascade Forward Neural Network (CFNN), Recurrent Neural Network (RNN) to predict rainfall that need non-linear technique (Dada, Yakubu, & Oyewola, 2021), Back Propagation Network (BP) to predict wind speed (Li, Zhang, & Mao, 2011). In other fields, ERNN has been compared with fully RNN, JRNN, LSTM, and FFNN to predict tourist visit (Sugiartawan & Hartati, 2019), with ANN and Existing Boosted NN on electric load data, namely voltage profile and active power losses (Devarajan & S, 2019). The application of ERNN on Covid-19 data has been used, but data positive Covid-19 to predict diagnosing it early on (Prasetiyo, Hakim, & Pradana, 2021). In those researches, ERNN gives the best performance than other methods. Its performance can be seen from various criteria, namely Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE). If the criteria give inconsistent result, then we would be chosen MAPE because it is more stable than other criteria (Wang, Wang, Fang, & Niu, 2016).
How good ERNN algorithm is in predicting various time series types has also been carried out in previous study. (Khaldi & Afia, 2018) have compare performance of MLP, ERNN, JRNN, and RBFNN on four types time series, namely trend, seasonality, trend with seasonality, and non-constant variance. This study can prove ERNN is the most suited for time series forecasting. In depth studies, ERNN has been applied with differences in maximal epochs, learning rates, and hidden node (Farhana & Sophiayati, 2015;Prasetiyo et al., 2021). Therefore, this study will apply ERNN on active case of Covid-19 with differences in proportion of training and testing data and differences in learning rate. While the performance of ERNN will be seen from MAPE values

B. METHODS
In this study, we will show how to apply ERNN manually and with a system that we built. Our study starts from collecting data on active case of Covid-19. That is seconder data that we collect from http://atapdata.ai. The second stage is to form dataset. The first step in this stage is to determine the maximum and minimum value that lie outside the data range. This is because predictions will be made and the possibility of predicted value is more than the current maximum value. After that, we calculate normalize the data using Equation (1).
where is data of active case in record-i, ′ is normalization of data in record-i, and i is index of data records. And then we define values 3 and 2 respectively as number of input node and hidden nodes. It effects on value of context node is 2 too. In architecture of Elman Recurrent Neural Network (ERNN), we have input unit as , hidden unit as ℎ , context unit as , output unit as , 0 as weight of bias 1 , 0 as weight of bias 2 and respectively , , and weight from network between input -hidden unit, context -hidden unit, and hidden -output unit. This architecture can be seen in Figure 1. The fourth step in this stage is to determine dataset based on the number of input node. The last step is to divide dataset into training data and testing data. In this research, based on ratio between training and testing data, dataset is design by three scenarios, namely data with ratio 90:10, 80:20, and 70:30. In each scenario, we will use varying learning rate from 0.1 until 0.9 with an increment as 0.1.
The third stage is to apply training algorithm to data training. The goal of this stage to achieve optimal weight of network. The training algorithm can be presented as shown in Figure 2. The following were equation that mentioned in Figure 2.
There is update the weight in Figure 2. To repair the weight, we use Equation (8) until Equation (16).

Data and Dataset
Data active case of Covid-19 in South Kalimantan is collected from March 30 until December 31, 2020 so it consists of 277 records. According to explanation in method, we need data example to apply ERNN manually, so we have chosen 11 records from December 21 until December 31 as data example. These data as shown in Table 1. Then we normalize data in Table 1 using Equation (1). As example, we calculate data active case on December 21, namely 1 . We determine maximum as 1050 and minimum as 800. With the same way, we got data normalization as shown in Table 2. Based on data in Table 2 and the number of input node is 3, we get dataset in Table 3. In order to distinguish the dataset used manual and system, we call dataset in Table 3 as Dataset 1. Application of ERNN on Dataset 1 would be found in C.2. Now, we will form Dataset 2. Regard to data that we have start from March 30, 2020 and number of input node is 3, then data of active case on March 30, 31, and April 1 would be input value to predict active case on April 2. Do the same way until data of active case on December 31, 2020 so we get the Dataset 2 that consist 274 records. Application of ERNN on Dataset 2 would be found in C.3

Apply ERNN Manually
In this stage, we determined learning rate α as 0.2, error tolerance as 0.01 or 1%, and maximal epochs (max epoch) as 3. The following are calculation example in first epoch. The value of context unit 1 is 0 because there was no context unit in date before. Then the initial weight is chosen randomly as shown in Table 4. The following are calculation of hidden unit to 1 (ℎ 1 ) and its illustration as shown in Figure 4. We calculate 1 of data 1 using Equation (2) and ℎ 1 using Equation (3).
With the same way to calculate ℎ 1 , value of ℎ 2 is got, that is 0.6604. After value of ℎ 1 and ℎ 2 is got, then context unit can be calculated by using Equation (4). 1 (2) = ℎ 1 (1) = 0.6964 2 (2) = ℎ 2 (1) = 0.6604 Then is calculated by using Equation (5)  The rest data in training data is calculated with the same way and the result as shown in Table 5.  Thus > and ℎ < ℎ then we updating weight using Equation (8) Table 6. Based on Table 6, we calculate MAPE using Equation 7 and we get MAPE as 3.97%. This result indicates that ERNN is the good method to predict active case in Dataset 1.

Apply ERNN with System
Through the system was built, we apply ERNN alternately for 90:10, 80:20, and 70:30. In scenario 90:10, input proportion of training as 90% and testing data as 10%, those are 247 and 27 records. The scenario 80:20 given data as 219 and 55 records, and scenario 70:30 given data as 192 and 82 records. Then we set learning rate from 0.1 until 0.9 with an increment as 0.1, maximum epoch as 100.000, and tolerance error as 0.000001. The result of applying ERNN with this system as shown in Figure 6. In overall from Figure 6, all MAPE below 10% and the smallest MAPE is scenario 90:10. In scenario 90:10, the smallest MAPE as 3.21% for learning rate = 0.6, meanwhile in scenario 80:20 and 70:30, the smallest MAPE for learning rate = 0.1. The results show that ERNN has been well implemented on COVID-19 data in accordance with research results (Khaldi & Afia, 2018) that ERNN is suitable for predicting time series data. The success of ERNN in predicting fluctuating Covid-19 data is also in accordance with research to predict fluctuating data on the opening of stock prices by (Zheng, 2015).

D. CONCLUSION AND SUGGESTIONS
ERNN has been applied on active case of Covid-19, namely Dataset 1 and Dataset 2. Dataset 1 was divided into 90% training data and 10% training data, set learning rate as 0.2, tolerance error as 0.01, and maximal epoch as 3. Application of ERNN on Dataset 1 gave MAPE as 3.97%. Meanwhile, 3 scenarios on Dataset 2 were ratio 90:10, 80:20, and 70:30. In each ratio, we set learning rate from 0.1 until 0.9 with 0.1 increments, maximum epoch as 100.000, and tolerance error as 0.000001. Application of ERNN on Dataset 2 provides all MAPE below 10% with the smallest MAPE as 3.21% for scenario 90:10 and learning rate 0.6. This shows that ERNN is a good method to predict active case of Covid-19. However, the accuracy can be classified as quite high because this research relates to human safety. Therefore, an in-depth study on predict of active case is needed. I hope that future research can compare ERNN with other methods, neural networks algorithms or another, to find the best method to predict active case of Covid-19. Researchers interested in this study, can also use difference increments of learning rate to test how well ERNN predicts.