key: cord-0064725-wly2snz2 authors: Shetty, Rashmi P.; Pai, P. Srinivasa title: Forecasting of COVID 19 Cases in Karnataka State using Artificial Neural Network (ANN) date: 2021-06-18 journal: J DOI: 10.1007/s40031-021-00623-4 sha: 74d9a7a51e9b282e3d74191ecb98eaceb2b8fb2b doc_id: 64725 cord_uid: wly2snz2 COVID-19 is a pandemic that has caused lot of deaths and infections in the last 2 months and is showing an increasing trend not only in the number of infections and deaths, but also in the recovery rate. Accurate prediction models are very much essential to make proper forecasts and take necessary actions. This study demonstrates the capability of Multilayer Perceptron (MLP), an Artificial Neural network (ANN) model for forecasting the number of infected cases in the state of Karnataka in India. It is trained using a fast training algorithm namely, Extreme Learning machine to reduce the training time required. The parameters required for the forecasting model have been selected using partial autocorrelation function, which is a conventional method, and its performance has been compared with parameters selected using cuckoo search (CS) algorithm, which is a very popular metaheuristic optimization algorithm. The testing of the forecasting model has been done, and comparison between the two parameter selection methods as well as with MLP with conventional backpropagation has been carried out. Use of CS algorithm has resulted in a better forecasting performance based on mean absolute percentage error (MAPE), with a value of 6.62% on training data and 7.03% on the test data. Further to check the efficacy of the model, the data of COVID-19 cases of Hungary from 4 March to 19 April 2020 have been used, which resulted in a MAPE of 1.55%, thereby establishing the robustness of the proposed ANN model for forecasting COVID-19 cases for the state of Karnataka. Severe acute respiratory syndrome (SARS) corona virus 2 is a virus strain that is causing severe respiratory disease, which is popularly known as COVID-19. World Health Organization (WHO) has declared it as a pandemic as on 11-03-2020. As on 04-05-2021, 154 million confirmed cases have been reported by the Johns Hopkins University [1] . In India, as on 4-05-2021, 20.7 million cases have been reported with 226,000 deaths [2] . This has disturbed the normal life of ordinary people and has affected many both economically and from other aspects. The lockdown imposed by the government in the initial stages has affected the livelihood of millions of people and has significant repercussions. There has been lot of stress on the administration for managing the spread of this virus, and accordingly there is a need for forecasting the probable number of cases, so that the infections can be managed effectively without undue strain on the health infrastructural facilities of the country. There have been several efforts regarding use of mathematical models and artificial intelligence (AI) tools in modeling, prediction and forecasting of the infected cases, recovered cases, mortality rate, etc., in the last several months. It is very important to model the spread and effect of such diseases, particularly creating a pandemic. AI modeling techniques are able to generate high-quality predictive models and can help in the various aspects of disease management. The data are readily available, and they are valid and from reliable sources. There is a need for a mechanism to manage the data efficiently and AI and in particular machine learning models can help in doing the same [3] . This paper presents a forecasting model based on multilayer perceptron, a popular, supervised and feed forward neural network model. The parameter selection for the model is based on PACF and using Cuckoo Search algorithm. The model has been checked for its efficiency, based on the data pertaining to Hungary. There has been a lot of work reported about the use of Artificial Intelligence and Machine learning (ML) for studying the various aspects of COVID-19. To review a few literatures, Shinde et al. [4] presented an overall, comprehensive analysis of different forecasting models for COVID-19 to help the organizations. The aspects covered include forecasting, impacts and control measures. The models have been studied from the point of view of challenges in using these and recommendations. The forecasting methods have been grouped into four namely big data sets accessed from WHO and national data sources, social media data, stochastic models and use of machine learning techniques. They recommend the need to test the models globally for better global forecasting. Swapnarekha et al. [5] presented a neural network approach in the prediction, diagnosis of COVID-19 for its effective control. The performance analysis of Deep learning, ML and statistical approaches has been performed which helps researchers in developing better models for predicting the disease. Pinter et al. [6] proposed an alternative to the susceptible-infected-resistant (SIR)-based models by proposing hybrid learning methods which use multi-layered perceptron with imperialist-competitive algorithm (MLP-ICA) and adaptive network-based fuzzy inference system (ANFIS). These models have potential, when compared to epidemiological models and MLP-ICA performed better than ANFIS and gave good results on validation data. Rustam et al. [7] studied different models based on ML to predict the patient numbers affected by the disease and included least absolute shrinkage and selection operator (LASSO), linear regression (LR), exponential smoothing (ES) and support vector machine (SVM). Different predictions such as, number of newly infected cases, the number of deaths and number of recoveries in the future ten days were made. ES performs well in the current forecasting domain based on the nature and size of the data. LR and LASSO perform well for forecasting death rate and confirmed cases. Sujath et al. [3] presented a model to predict COVID-19 spreading. The models studied include LR, MLP and Vector autoregression (VAR) method using Kaggle data to forecast the epidemiological example of the disease and number of cases in India. It was found that, MLP performed better than LR and VAR using Weka an Orange by considering the data from John Hopkins University. Saba and Elsheikh [8] studied statistical-based method namely nonlinear autoregressive artificial neural networks (NARANN) and autoregressive integrated moving average (ARIMA) for modeling and forecasting the prevalence of this disease in Egypt. The data of confirmed cases are used to train the proposed models. NARANN performed better than ARIMA and found to be useful for multi-step forecasting with high coefficient of determination, and the forecasted error was less than 5%. Hassan [9] used realtime data to investigate a hybrid model namely ensemble empirical mode decomposition (EEMD)-ANN, to predict the daily trend of COVID-19. The EEMD method is used for data denoising, and ANN is used to build the model. The model was compared with statistical techniques like regression analysis and moving average. The proposed model has very low mean squared error (MSE) and high R 2 values. Car et al. [10] used a data set of 406 locations for a time duration of 51 days, which was converted into a regression data set and used to train a MLP model. From among the three categories of models, the deceased patient model was highly robust. There was good robustness for the infected patient model and poor performance for the recovered patient model. Tamang et al. [11] used ANN curve fitting techniques in predicting and forecasting the confirmed and death cases of COVID-19 in India, USA, France and UK using the data from South Korea and China. The results indicate that ANN is most suitable for COVID-19 forecasting of any nation. Mollalo et al. [12] made a review of countrywide modeling of COVID-19 cases in USA, by using ML techniques and identified 57 variables for checking the performance of MLP to predict the cumulative COVID-19 occurrence rates in continental USA. Proposed model was able to establish 65% correlation with the ground truth for the hold out samples. This review highlights the wide range of models and areas covered, with scope for use of ML-related methods for modeling, prediction and forecasting of the disease. ANN due to its ability to map meaningful relationships in the data is becoming popular day by day in medical field for clinical diagnosis, drug development, improved gene editing and in prediction and forecasting of diseases. Feed forward neural networks are the simplest but powerful class of neural networks which find wide application due to their ability to model any nonlinear relation underlying the data, which otherwise are difficult to be handled by conventional techniques. The main feature of ANN, which makes its application universal, is its learning ability and thereby adjusts synaptic weights and biases to best fit the given environment. Back Propagation (BP) algorithm, though very popular and used in many areas, suffers from many problems. This iterative algorithm, in addition to being slow and time consuming, suffers from local minima problem. There are most chances of overtraining of the network, if the appropriate stopping criteria are not set during learning. Use of many simulation parameters makes it sensitive to parameter tuning and needs more human intervention [13] . Extreme learning machine (ELM) is a powerful technique presented by G. B Huang [14] , which overcomes the disadvantages of BP. Good generalization performance with less simulation parameters are the added advantages of ELM in training MLP, when compared to use of BP in training MLP as well as support vector machines (SVM) [15] . Multilayer perceptron is a popular feed forward model, which uses Backpropagation (BP) algorithm. It consists of one or more hidden layer with nonlinear sigmoidal activation function as given in Eq. (1) where,x l i is the input data with i ¼ 1; 2; . . .:s input features and l = 1,2,…n input patterns. b j and w ji are the bias and weights, respectively, between hidden and input layer with j = 1,2,3…p is the neurons in the hidden layer. MLP possesses high degree of connectivity and constructs global approximation. Hence, it is capable of mapping any nonlinear relationships [13] . This algorithm, being a simple and non-iterative method, draws the attention of researchers from various fields. The one pass learning helps in saving the learning time considerably and thus finds a major application in emerging areas such as pattern recognition, image analysis, bioinformatics and other prediction and forecasting purposes involving big data [14] . The ELM algorithm is as follows: For N arbitrary distinct training data x i ; t i ð Þ; where X i 2 R n is n à 1 input and t i 2 R m is m à 1, target vector and Q hidden nodes, if the activation function g x ð Þ is used, then the output O j of the model can be expressed mathematically as: where, w i and b i with i = 1,2,…Q are the weight matrix between hidden, input layers and between output, hidden layers of size n*Q and Q*m, respectively. b i is the bias of ith hidden node. Equation (2) can be expressed as where, : : . . . : : : The output weight matrix is found using Eq. 7 where H y is the Moorse-Penrose generalized inverse of matrix H [14] . The metaheuristic algorithms are inspired by natural processes and are stochastic in nature. In 2009, Yang and Deb introduced CS algorithm, which is based on cuckoo bird's obligate brood parasitic nature and Levy flight behavior of animals. This algorithm is fast and efficient in exploring the optimal solution, has less chances of being trapped in local minima, because of the Levy flight mechanism to generate new solutions, and is a popular nature inspired optimization algorithm [16] [17] [18] . Partial autocorrelation function is a method used to perform time series data analysis. It is used to evaluate the order of the autoregressive model. It is mainly useful in determining the lag in autoregressive (AR) and ARIMA models. It is helpful in understanding the linear dependence of a value in the time series data with its lagged value [19] . Three MLP-based models are trained with ELM learning algorithm by using CS and PACF for selection of input parameters. Details of the models developed are presented in Table 1 . When sigmoidal activation function is used in the ELM based model, there are no simulation parameters to be tuned. Figure 1 provides proposed model (Model-2) framework. The simulation parameters of Model-3 namely learning rate, momentum rate have been set to be 0.15, 0.08, and the stopping criteria have been set as maximum of 1000 epochs or minimum error of 1 9 10 -3 . Data of COVID-19 infected cases in Karnataka state of India are provided by the government and are available in https://www.google.com/search?client=firefox-b-d&q=covid ?19?tracker. Figure 2 presents the daily reported cases of COVID-19 in Karnataka from 10 March 2020 to 21 July 2020, which shows a steep increase after 10th June. The data have been normalized to bring it in 0-1 range by using Eq. (8) . This helps in providing uniform contribution of each data in model building. where X 0 is the data after normalization, X is the actual data and X max is the maximum value in the dataset. The simulation of the present work has been done in MATLAB R2014a on a personal computer with an Intel i5-6200U 2.3 GHz CPU and 4 GB RAM. Once the optimum number of input parameters (n) is selected, the data set is prepared as shown in Fig. 3 , from total of N number of data instances. In the present work, the total number of data instances is 133. The objective function for CS algorithm has been considered as; minimize the mean absolute percentage error (MAPE) between actual and predicted values as given in Eq. (9) . CS algorithm selected the optimum number of input parameters as 5. The MAPE (%) variation with number of iterations of CS is presented in Fig. 4 . The partial correlogram of PACF method for the data is presented in Fig. 5 . It can be analyzed from the figure that only one input parameter is having high correlation with more than 95% significance level. Hence, 128 and 132 datasets from 133 total data instances are generated with input and output as detailed in Table 1 for CS-based and PACF-based parameter selection, respectively. Out of which 85% is used for training the ANN model and rest for the testing the same. The selection of the data set has been done randomly, to take care of the generalization performance and avoiding overfitting. where y p i ð Þ, y a i ð Þ are predicted and actual values of number of COVID-19 cases at ith time instance and N represents the total number of datapoints considered. The values of the parameters set for CS algorithm in this work have been provided below. (1) Probability P a = 0.25. (2) Stopping criteria = 100 iterations. To estimate the performance of the models, mean absolute percentage error (MAPE) and root mean square (RMSE) as given in Eq. (9) and (10), respectively, have been used as the performance metrics. The hidden neuron numbers have been varied to obtain better accuracy. The performance of Model-1 for different hidden neurons is shown in Table 2 . It can be seen that the model gives minimum MAPE (%) of 20.73 for 25 hidden neurons on test data. Hence, the optimum model configuration is 1:25:1. The actual and Model-1 predicted values are shown in Fig. 6 . Performance of Model-2 for varied number of hidden neurons is shown in Table 3 . It is noted that when the number of neurons is 10, the model showed best performance with least MAPE (%) value of 7.03 on test data. It is also observed that further increase in number of hidden neurons leads to decaying model accuracy. Hence, the optimal model configuration is found to be 5:10:1. Figure 7 shows actual and Model-2 forecasted values for the test set considering 1-step, 3-step and 5-steps. Both the models use MLP with ELM algorithm, but the difference is in the approach used to select the input parameters. The summary of model structure, performance and time taken by the models is presented in Table 4 . It can be noted that Model-1, which used PACF, used only one input parameter in comparison with five input parameters selected by CS algorithm in Model-2. Model-2 with CS algorithm uses iterative procedure in selecting the optimum number of input parameters, with objective of minimizing of Model-1 on test data. Graphical illustration of Model-2 predicted and actual COVID-19 infected cases is presented in Fig. 2 . A good agreement of predicted values with actual is found. Thus, the CS algorithm, which is used in a wide variety of applications, is proved successful in improving the forecasting accuracy of the ANN model, when used with optimal input parameter selection. For proving the novelty of the present work and to understand the benefits of using the present model using ELM algorithm, it has been compared with MLP neural network model based on BP algorithm, which is a widely used popular technique. The details of Model-3 are provided in Sect. 4.5. CS-based feature selection is used in both models for comparison. From Table 5 To prove the suitability of the proposed model in predicting the COVID-19 cases for future time horizon, a multistep forecasting is performed and results are presented for 3-step and 5-step ahead forecasting. Each time step represents days in the present case. The multistep forecasting results presented in Table 6 and Fig. 7 show that the model proposed is capable of predicting for multiple future time steps with reasonable accuracy. It can be observed that, with the increase in time step the error increases. This is obvious because of the accumulation of the error of the previous time step, which is fed as the input to the next time step prediction. [21, 22] is provided in Table 8 and the results clearly establish the effectiveness of the model. To check the feasibility of the model for future time horizons, multistep forecasting has been performed. The results of this study reveal that. (i) MLP-ELM-based forecasting model results in quick learning with less number of simulation parameters. (ii) Use of CS optimization algorithm in Model-2 for input parameter selection results in noticeable reduction in MAPE (%) to 7.03 in contrast to 20.73 of Model-1, which is based on PACF on test data. (iii) The proposed forecasting model that combines ELM and CS is found to be effective, when tested using Hungary data and compared with MLP-ICA method found in [6] , resulting in 1.55 MAPE (%) against 23.15% on training data. (iv) MAPE (%) of 9.02 and 10.93, respectively, for 3-step and 5-step ahead forecasting proves the effectiveness of the proposed model for future time steps, which is of great importance in the current pandemic situation. Thus, this research work proposes an effective ANNbased forecasting model, which can be used for forecasting COVID-19 cases, in the state of Karnataka, India showed a gradual increase from May to June 2020 and a steep increase in cases beyond 4 July 2020. To further validate the proposed model, it can be tested using data from the states of India, with increased reported cases similar to Karnataka and may be considering India as a whole. The model has worked well for Hungary data, where the number of reported cases is significantly lower than the state of Karnataka and the increase is very gradual and not as significant as in Karnataka in the last one month. Further, the model can be broad based to include other types of data like number of cases recovered and mortality rate. MLP, a simple, tried and tested ANN model applied in various applications in last 25 years has proved effective for an important application like forecasting the number of infected cases of a pandemic like COVID-19. A machine learning forecasting model for COVID-19 pandemic in India Forecasting models for coronavirus disease (COVID-19): a survey of the state-of-the-art Role of intelligent computing in COVID-19 prognosis: a state-of-the-art review COVID-19 pandemic prediction for hungary; a hybrid machine learning approach COVID-19 future forecasting using supervised machine learning models Forecasting the prevalence of COVID-19 outbreak in Egypt using nonlinear autoregressive artificial neural networks A methodological approach for predicting COVID-19 epidemic using EEMD-ANN hybrid model Modeling the spread of COVID-19 infection using a multilayer peceptron Forecasting of Covid-19 cases based on prediction using artificial neural network curve fitting technique Artificial neural network modeling of novel coronavirus (COVID-19) incidence rates across the Continental United States Neural Networks: A Comprehensive Foundation Extreme learning machine: theory and applications Extreme learning machine and its applications Cuckoo search via Lévy flights Wind power optimization: a comparison of meta-heuristic algorithms An efficient online sequential extreme learning machine model based on feature selection and parameter optimization using cuckoo search algorithm for multi-step wind speed forecasting A conceptual comparison of the Cuckoosearch, particle swarm optimization, differential evolution and artificial bee colony algorithms Covid-19 outbreak prediction with machine learning Predicting the growth and trend of COVID-19 pandemic using machine learning and cloud computing Conflict of interest Authors have no conflict of interest to disclose.