ARTIFICIAL NEURAL NETWORK APPLICATION IN MODELING MORTALITY OF COVID-19 PATIENTS IN INDONESIA

. The Indonesian government and public healthcare system have been under massive pressure due to increased infections and mortality rates among Covid-19 patients. An appropriate model is needed to model the mortality of Covid-19 patients in Indonesia to help the Indonesian government develop the right policy for dealing with the Covid-19 pandemic. Artificial neural networks are increasingly popular in various research fields. Artificial neural networks can detect specific patterns in mortality modeling. In this study, we use artificial neural networks to model the mortality rate of Covid-19 patients in Indonesia. We try combinations of activation functions, learning rates, and hidden layers for the best predictions. We compare the prediction accuracy of artificial neural networks with that of the Holt-Winters method. The results showed that the best model of artificial neural networks produced an RMSE of 3.0530. In contrast, the Holt-Winters method produced an RMSE of 664.9022. Therefore, the artificial neural networks performed better than the Holt-Winters method in analyzing mortality data of Covid-19 patients in Indonesia.


I. INTRODUCTION
The state of the Covid-19 pandemic in Indonesia encouraged the researchers to do this study.Based on data in [1], there are 6,730,016 positive cases of Covid-19 in Indonesia as of January 31, 2023.Indonesia ranks second in Southeast Asia and 20th in the world in the number of cases, with 160,814 deaths.At the peak of Covid-19 cases, the Indonesian government and the public healthcare system in Indonesia were under pressure due to the increasing number of positive cases and deaths.The occupancy rate of hospital beds in some hospitals exceeds 100% [2].Furthermore, the death rate of Covid-19 patients is related to hospital capacity; the lower the hospital capacity, the higher the death rates of Covid-19 patients are [3].Therefore, an appropriate model is needed to model the mortality rate of Covid-19 patients in Indonesia to help the Indonesian government determine the right policies in dealing with the Covid-19 pandemic.
The artificial neural network method is increasingly popular in various fields of research.One of the applications of it is for modeling mortality.Studies on mortality modeling using artificial neural networks were carried out by [4] and [5].
Several models using artificial neural networks were analyzed by [4] to predict one-year mortality after surgical treatment in elderly patients with hip fractures.The model aims to help elderly patients and doctors better assess surgery risks and make informed decisions.The data used were from 286 elderly patients (> 65 years) with hip fractures who were admitted from January 2005 to May 2007.The models analyzed were four models of artificial neural networks (20 neurons, 25 neurons in the hidden layer, 30 neurons in the hidden layer, and automatically selected) and two logistic regression models (main effects and main effects + two-way interactions).These models were then compared to the accuracy of their predictions.Based on data analysis, the results show that the best model of logistic regression is the model with the main effect + two-way interactions, with an average accuracy rate of 79.36% (accuracy rate for training data is 86.60% and data testing is 71.91%).On the other hand, the best artificial neural network model is the automatically selected model with an accuracy rate of 97.00%.Based on these results, the artificial neural network method with the automatically selected model produces higher accuracy than the logistic regression model.
In addition to [4], [5] also applies the artificial neural network method in their research.The aim of the study conducted by [5] is to identify the long-term effects of air pollution on respiratory morbidity and mortality with the Dickey-Fuller test, identify pollutants that contribute more to death, predict respiratory mortality and morbidity with a nonlinear time series model (NAR) with multi-layer perceptron (MLP), and develop an accurate statistical prediction model to predict respiratory mortality and morbidity.MLP is one of the models in artificial neural networks.To compare the MLP and NAR models, the mean square error (MSE) and correlation coefficient (R) were calculated from the testing data.The study results show that the MLP and NAR models are beneficial for predicting respiratory mortality and morbidity.
Based on previous research, we can conclude that we can use the artificial neural network method to improve the accuracy of mortality modeling.Therefore, in this study, we use the artificial neural network method to model the mortality of Covid-19 patients in Indonesia.

II. METHODOLOGY
An artificial neural network is designed based on some basis of biological neuron cell structure and processes.The structure of neuron cells, such as shape, size, and structure, can define the cells' capability and importance in networks for transferring signals.It is simulated as weights in the artificial neural networks, representing the importance of each neuron in the network.[6] An artificial neural network consists of 3 layers, first, input layer.The input layer is the initial layer in the neural network structure.This layer receives input as information that will enter the model for the model training process.Second, the hidden layer.The hidden layer has the role of transferring information from the input layer or the previously hidden layer.Third, the output layer.Artificial neural networks process the information from the input layer through the hidden layer, then produce an output at the output layer.
The main components in building artificial neural networks are individual cells called neurons.Usually, a neuron has several inputs.The structure of the neuron model with  input can be seen in Figure 1 [7].  1) can be written in matrix form: with Net input is then processed by the activation function to produce the output :  = (   + ) An artificial neural network has several parameters that need to be considered to produce a model with good performance, including learning rate, number of hidden layers, and type of activation function.The learning rate determines how fast the neural network model achieves convergent results.The learning rate has a value from 0 to 1. Choosing the improper value can affect the training convergence [6].
The activation function is used to activate or deactivate a neuron.According to [6], there are several activation functions, but the most popular ones are: The value range of this activation function is [-1 to 1], and it maps the negative to the negative values, and zero values will be near zero.Also, it is differentiable and is used mainly for classification problems.
(5) The ReLU value range is [0, ∞), and its output is zero when  is less than zero and is equal to  when  is above or equal to zero.
The probability of everything has a value between 0 and 1.There are many models with outputs of probability values.For these problems, a sigmoid can be the right choice.The sigmoid is also differentiable.
Previous research on mortality modeling using artificial neural networks was carried out by [8], [9], [10], [11], [12], [13], [14], and [15].Artificial neural networks and logistic regression were compared by [8] to predict patient mortality after liver cancer surgery.The data was taken from patients who underwent surgery from 1998 to 2009.The study results show that artificial neural networks provide more accurate predictions than logistic regression.
The Lee-Carter model was combined with the ARIMA method (LC-ARIMA), artificial neural network method (LC-ANN), and Random Forest method (LC-RF) by [9] to model male and female mortality data in Malaysia.In addition, a comparative analysis was also carried out on mortality data from 11 other countries, namely Canada, Sweden, Ireland, Japan, South Korea, Hong Kong, Norway, Switzerland, Latvia, Slovakia, and the Czech Republic.Model evaluation is done by calculating the Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Average Forecast Error (AFE).The results show that the LC-ANN model performs better in modeling mortality data in Malaysia, Canada, and Latvia.In contrast, the LC-ARIMA model is the best model for modeling mortality in Sweden, Ireland, Japan, Hong Kong, Norway, Switzerland, and the Czech Republic.
The artificial neural network model was also applied by [10] to predict the mortality rate of Covid-19 patients in India.The data used were the deaths and confirmed cases of Covid-19 in India from January 20 to May 30, 2020.The dataset was divided into training and testing data.The methods used were Probabilistic Neural Network (PNN), Generalized Regression Neural Network (GRNN), and Nonlinear Autoregressive Neural Network (NAR-NN).Model performance was evaluated using the RMSE and the correlation measure R.
Machine learning models, such as Decision Tree, Logistic Regression, Random Forest, Extreme Gradient Boosting, K-Nearest Neighbor, and deep learning, have also been applied by [11] to predict the death rate of Covid-19 patients.The raw data consists of 2,676,311 data on Covid-19 patients from 146 countries.Then, the data cleaning process is carried out before analyzing the data.The final data used is 103,888 data.Accuracy, precision, sensitivity, and specificity values are calculated to evaluate the model obtained.
A predictive model with a machine learning algorithm was built by [12] to predict the risk of death for Covid-19 patients.Support Vector Machine, Artificial Neural Networks, Random Forest, Decision Tree, Logistic Regression, and K-Nearest Neighbor were the models used.Model evaluation was done by calculating the accuracy, sensitivity, and specificity values.The dataset used consists of 2,670,000 data on Covid-19 patients from 146 countries.
The research conducted by [13] predicts neonatal infant mortality using artificial neural networks and logistic regression.The study was conducted based on data from 1,618 neonatal babies.The data was divided into training data (80%) and testing data (20%).The results showed that the artificial neural network method produced a better model than logistic regression.
Research by [14] analyzed the effect of 75 predictor variables on the death of Covid-19 patients using an artificial neural network.The data used was the Covid-19 data from March 2020 to February 2021.Before being analyzed, the data was divided into four intervals: March -May 2020, June -August 2020, September -November 2020, and December 2020 -February 2021.The analysis results show that the prevalence rate of patients with diabetes and Artificial neural network application was used by [15] to predict the death rate of Covid-19 patients in Italy.The data was divided into training data (70%) and testing data (30%).Model evaluation was done by calculating the MSE and R values.The results show that the artificial neural network method produces highly accurate predictions.
Based on previous studies, it can be concluded that the artificial neural network method can be used to improve the accuracy of mortality modeling.Therefore, this study uses the artificial neural network method to model the mortality of Covid-19 patients in Indonesia.Model evaluation is carried out by calculating the RMSE.The best model is the model with the smallest RMSE.The RMSE value is calculated using the formula in equation ( 7) [16]: where  is the amount of data,  is the death rate of the original data, and  ̂ is the predicted result of the death rate.Furthermore, the RMSE of the best model produced by the artificial neural networks is compared with the RMSE of the Holt-Winters method.The Holt-Winters method is one of the well-known methods for modeling seasonal time series data.
According to [17], the Holt-Winters method involves three smoothing equations: one for the level, one for trend, and one for seasonality.There are two different Holt-Winters methods, depending on whether seasonality is modeled in an additive or multiplicative way.The basic equations for Holt-Winters' multiplicative method are as follows: + = (  +   ) −+ (11) where , ,  are smoothing constants,  is the length of seasonality,   represents the level of the series at time ,   denotes the trend of the series at time ,   is the seasonal component of the series at time , and  + is the forecast for  periods ahead of the series at time .On the other hand, the basic equations for Holt-Winters' additive method are as follows:

III. RESULTS AND DISCUSSION
This study used daily data on the death of Covid-19 patients starting from April 1, 2020, to December 31, 2022, which was accessed from [18], as presented in Figure 2.  Before using artificial neural networks, the data were divided into training data (75%) and testing data (25%).A numerical summary of the training and testing data is shown in Table 1.  1 shows that the training data is more spread out than the testing data, so it is necessary to normalize it before further analysis.Furthermore, various combinations of the activation function, learning rate, and hidden layer have been tried to get the best prediction results.Prediction in artificial neural networks proceeds by passing observation to the first layer; the output of the final layer gives the predicted value.Data analysis using artificial neural networks was carried out with the help of R software using the neuralnet package.The following is an algorithm for modeling data using artificial neural networks [6]: 1) Calculate the weighted input to the hidden layer.
2) Apply the activation function and pass the results to the next layer.
3) Repeat steps 1 and 2 for all layers.The summary of the results the data analysis using artificial neural networks can be seen in  Table 2 shows that the artificial neural network with the tangent hyperbolic activation function, a learning rate of 0.0001, and a hidden layer of 5 has the smallest RMSE (3.0530).On the other hand, the Holt-Winters' estimation is calculated using the HoltWinters function in R. The Holt-Winters method produces an RMSE of 664.9022.Furthermore, a graph comparing the predicted values between artificial neural networks and Holt-Winters method can be seen in Figure 3.

IV. CONCLUSION
Based on the comparison of RMSE and the plot of predicted values in the previous section, we can conclude that artificial neural networks can be used to model the mortality of Covid-19 patients in Indonesia.It is necessary to pay attention to the activation function, hidden layer, and learning rate used when conducting data analysis.For further research, it is recommended to use deep learning methods to produce better predictions.
Figure 2 shows that Indonesia experienced three waves of Covid-19 during the period ±3 years, in which the peak of the first wave occurred on January 28, 2021, with 476 deaths of Covid-19 patients; the second wave reached its highest point on July 27, 2021, with 2069 deaths of Covid-19 patients; and the third wave peaked on March 8, 2022, with 401 deaths of Covid-19 patients.

Figure 3 .
Figure 3.Comparison of predicted death cases of Covid-19 in Indonesia between the best model of artificial neural networks and the Holt-Winters method

Table 2 .Table 2 .
Comparison of RMSE values with a different model of artificial neural networks