key: cord-0748295-q928r7rk authors: Shaibani, Mohammad Javad; Emamgholipour, Sara; Moazeni, Samira Sadate title: Investigation of robustness of hybrid artificial neural network with artificial bee colony and firefly algorithm in predicting COVID-19 new cases: case study of Iran date: 2021-09-30 journal: Stoch Environ Res Risk Assess DOI: 10.1007/s00477-021-02098-7 sha: 0fc75a7f2dcd37a8b11c2038a840702c39ffaddd doc_id: 748295 cord_uid: q928r7rk As an ongoing public health menace, the novel coronavirus pandemic has challenged the world. With several mutations and a high transmission rate, the virus is able to infect individuals in an exponential manner. At the same time, Iran is confronted with multiple wave peaks and the health care system is facing a major challenge. In consequence, developing a robust forecasting methodology can assist health authorities for effective planning. In that regard, with the help of Artificial Neural Network-Artificial Bee Colony (ANN-ABC) and Artificial Neural Network- Firefly Algorithm (ANN-FA) as two robust hybrid artificial intelligence-based models, the current study intends to select the optimal model with the maximum accuracy rate. To do so, first a sample of COVID-19 confirmed cases in Iran ranging from 19 February 2020 to 25 July 2021 is compiled. 75% (25%) of total observation is randomly allocated as training (testing) data. Afterwards, an ANN model is trained with Levenberg–Marquardt algorithm. Accordingly, based on R-squared and root-mean-square error criteria, the optimal number of hidden neurons is computed as 17. The proposed ANN model is employed to develop ANN-ABC and ANN-FA models for achieving the maximum accuracy rate. According to ANN-ABC, the R- squared values of the optimal model are 0.9884 and 0.9885 at train and test stages. In respect to ANN-FA, the R-squared ranged from 0.9954 to 0.9940 at the train and test phases, which indicates the outperformance of ANN-FA for predicting COVID-19 new cases in Iran. Finally, the proposed ANN-ABC and ANN-FA are applied for simulating the COVID-19 new cases data in different countries. The results revealed that both models can be used as a robust predictor of COVID-19 data and in a majority of cases ANN-FA outperforms the ANN-ABC. As a severe acute respiratory syndrome, the novel coronavirus or COVID-19 (as stated by the World Health Organization) since its outbreak in December 2019 in Hubei Province of China, has altered the world. The pandemic was accompanied with the rapid transmission and conjointly with a huge disease burden. Because of that, the number of new positive cases has surged exponentially. Until August 2021, the total worldwide deaths attributed to COVID-19 has been more than 4.28 million (Worldometers dataset 2021). Taking into consideration the speedy spread as well as the life-threating outcomes of COVID-19, plenty of states put limits such as lockdown, wearing mask face or travel restrictions on normal life of citizens to reduce and manage the virus transition via behavioral change. The imposed limits stemmed from the crisis have considerable negative implications suchlike global economic recession (Fernandes 2020) , social stigma caused by mixed and misinformation (Sotgiu and Dobler 2020) , mental health issues including depression and anxiety (Xiong et al. 2020; Stankovska et al. 2020) , educational concerns concerning quality and inequality (Marinoni et al. 2020) , food insecurity concerns (Workie et al. 2020) or negative impact on quality of relationships (Pietromonaco and Overall 2020) , which overcome some positive implications regarding ecological and environmental impacts (Verma and Prakash 2020) . In the meanwhile, Iran has experienced several wave peaks since the initial announcement of COVID-19 as an epidemic on February 2020. As of the time of writing the current investigation, based on Worldometer dataset, the total cumulative death caused by COVID-19 in Iran has been 92,628 (Worldometer dataset 2021). Mistrusts and cultural concerns regarding public policies (Jafari and Gharaghani 2020) , the financial and economic restriction for supporting quarantined people and entities (Yoosefi Lebni et al. 2021) , the influence of economic sanctions on the health sector to fight against COVID-19 (Takian et al. 2020 ) and dissemination of fake information and fallacious recommendations regarding pandemic on the social media (Shalbafan and Khademoreza 2020; Salimi et al. 2020) can be categorized as the bulk challenges of Iranian policy makers to battle against pandemic. In that sense, providing powerful predicational means to forecast the near-term COVID-19 new cases can assist the health authorities to predict, select and evaluate the most promising policy instruments to control and alleviate the crisis. The remainder of this paper is ordered as follows: first we review the ongoing literature of COVID-19 forecasting. Then the modelling procedures used in this study including artificial neural network (ANN), artificial bee colony (ABC) and firefly algorithm (FA) will be described. After that, we will develop ANN, the hybrid ABC and FA models. Finally, the results will be presented and discussed. From many years-ago, humankind was interested in forecasting multitudinous phenomena. In the contemporary era, the future trend prediction with minimum error (or maximum achievable accuracy) can represent a robust tool for policy making. Formulated on logical expectations of experts, there are qualitative forecasting methods. Still and all, those qualitative expectations might not provide a precise tool; Hence, these methods should be accompanied with quantitative tools. As robust quantitative tools, artificial intelligence (AI)-based methods including Artificial Neural Network (ANN), Artificial Bee Colony (ABC) and Firefly Algorithm (FA) have achieved various applications in mining sciences , Noroozi Ghaleini et al. 2019 , biochemical engineering (Yeh and Hsieh 2012) , the computed tomography for identification of brain tumor (Woźniak et al. 2021 ), water quality forecasting (Chen et al. 2018) , the optimal use of energy in residential buildings (Zhou et al. 2020) , wind speed forecasting (Jia et al. 2016 ) as well as other computational fields. Nevertheless, as far as we are aware, employing ABC and FA algorithms for predicting COVID-19 cases is still limited. Despite this, many researchers have conducted investigations concerning COVID-19 trend forecasting via employing various research methodologies. There are many articles which applied regression and machine learning analysis using timeseries data. Parbat and Chakraborty (2020) focused on prediction of COVID-19 new cases in India. They developed a vector regression model in professional software via considering the number of daily cases as dependent variable and number of observations (days) as independent variable. For forecasting the daily new cases, their results demonstrate 87% accuracy. Gothai et al. (2021) have reported worldwide COVID-19 prediction using machine learning algorithms. They used linear regression, support vector machine and Holt's winter linear model. With an accuracy of 87%, the Holt method outperformed the other models. Another machine-learningbased prognostication is presented by Zivkovic et al. (2021) . The COVID-19 new cases are predicted via a hybrid machine learning and beetle antennae search algorithms. They validate the proposed technique by using China and US data. With a R-squared of 0.9763, the authors concluded that the proposed model can be a robust forecaster of COVID-19 cases. Zheng et al. (2020) proposed another AI-based hybrid model. They developed a susceptible-infected model for approximating the infection rates. Then, by using natural language processing module and long short-term memory as well as the improved susceptible-infected method, a hybrid model is developed. Additionally, the authors set the accuracy of traditional epidemic models as the benchmark and then compared it with the accuracy of the hybrid model. The results showed that the hybrid model can predict the COVID-19 outbreak with less error. have also developed a hybrid machine learning algorithm as a forecaster of COVID-19 in Quebec, Canada. They developed a hybrid reinforcement learning based model and assess its accuracy. The mean square error is computed as 6.29E-06. Wieczorek and Woźniak (2020) have employed ANN model for short-term prediction of COVID-19 cases. First, they tested the conventional ANN in opposition to Recurrent Neural Network (RNN). The results indicated that RNN had a tripled computational time than ANN and the ANN with a minor disparity outperformed the RNN. Hence, they adopted ANN for the training stage. In the training stage they checked various algorithms including Adam, Adagrad, Adamax, RMSprop, NAdam and SDG. According to the results, they selected NAdam training algorithm with 87.73% accuracy rate and the proposed ANN model was used for the prediction. In a relevant examination, Wieczorek et al. (2020a Wieczorek et al. ( , 2020b have predicted COVID-19 new cases using an autoregressive ANN model by considering coordinates. After pre-processing the input data, they developed two ANN architectures for the worldwide and countries. The proposed ANN was trained using Adam training algorithm. The findings disclosed that the proposed model can render a proper approximation of COVID-19 trend. By using gradient-based grey wolf optimizer, have published a study concerning COVID-19 prediction. First, they compared their algorithm with some benchmark algorithms and concluded that the proposed model is more accurate. Then, via applying US data they predict that the COVID-19 cases will reach to 19 million by November, 2021. In the case of Iran, Behnam and Jahanmahin (2021) have predicted COVID-19 new cases using machine-learning methods and timeseries data. Based on the results, Gaussian function is the desirable predictor and they concluded that the peak of pandemic can occur 150 days after outburst. Talkhi et al. (2021) have also modeled COVID-19 new cases in Iran. The authors compared various timeseries methods namely ARIMA, Holt-Winter, prophet, multilayer perceptron model and extreme learning machine. The results indicated that with a root mean square error of 12.3, the Holt-winter model can be a good predictor of COVID-19 mortality cases in Iran. Kafieh et al. (2021) provided a similar study concerning COVID-19 trend forecasting in Iran as well as other countries. The results demonstrated that with a root mean square error of 458.12, the multivariate long shortterm memory is the optimal choice. The other study which focused on the worldwide prediction is reported by Yu et al. (2021) . The authors employed various AI-based models namely autoregressive integrated moving average (ARIMA), feed-forward neural network and long shortterm memory (LSTM). Accordingly, they conclude that the results obtained from the deep learning approaches cannot be stable (i.e., for the most countries LSTM can provide a more promising prophecy). Furthermore, a comparative analysis of artificial neural network (ANN) and Gompertz technique for predicting the number of COVID-19 deaths in Mexico is reported by Conde-Gutiérrez et al. (2021) . As a result of their study, by employing 10 coefficients it is observed that ANN can fit real data with more accuracy while the Gompertz technique with 3 parameters can be converged faster. Kolozsvari et al. (2021) used AI-based methods to predict the epidemic curve of COVID-19 as well. Using global data, they have forecasted persistent peaks on the epidemic curve. In a further investigation, Shaharudin et al. (2021) applied recurrent forecasting singular spectrum analysis to predict near-term COVID-19 cases in Malaysia. With a root mean square error of 19.2, they select the optimal model. A study conducted by Namasudra et al. (2021) proposed nonlinear autoregressive neural network time series for predicting COVID-19 cases. They trained the model with various algorithms. The results indicated that Levenberg-Marquardt training algorithm is the most suitable technique for training the neural network. Using multiple linear regression analysis as well as data of COVID-19 cases and number of phone calls of National Health Service 111 (NHS 111), Rostami-Tabar and Rendon-Sanchez (2021) have forecasted the daily COVID-19 cases in the UK. Compared to benchmark models (e.g., ARIMA, exponential smoothing or seasonal naïve), the authors concluded that with 95% of forecasting intervals for every horizon, their model can generate a more accurate prediction of COVID-19 cases in the UK. By employing online medical data in China (Shenzhen city), Huang et al. (2021) tried to forecast COVID-19 cases. They have used data regarding consultation, appointment and online outbreak search, and then conducted a multivariate vector autoregression analysis. The results revealed that online medical appointment can be a determinant factor in forecasting of COVID-19 cases up to two days. In another study, Guleryuz (2021) by deploying time series data of Turkey has presented COVID-19 trend prediction based on a univariate ARIMA, exponential smoothing and long short-term memory methods. Using Augmented Dickey Fuller, the author tested for stationarity. The results showed the first difference of COVID-19 new cases will be stationary and ARIMA model outperforms the other methods. A similar result obtained from a study conducted by Alzahrani et al. (2020) which used ARIMA to predict new cases in Saudi Arabia. They concluded that ARIMA outperforms autoregressive, moving average and ARMA. A comparison of ARIMA with prophet forecasting model was made by Satrio et al. (2021) in Indonesia. They concluded that prophet model is more precise than ARIMA. Nonetheless, by increasing time of prediction, the discrepancies between actual data and the prophet model prediction tend to increase. Roy et al. As it was reviewed, there are various forecasting methods. Many researchers have utilized the linear regression models as the main prediction technique or as a comparator for benchmark testing. It should be emphasized that linear regression methods are not suitable in considering non-linear patterns among parameters. In connection with accumulated COVID-19 variables, it could be expected that the linear methods provide a sound prediction. That is, the cumulative COVID-19 cases usually have a linear shape which increment across time. On the other hand, as depicted by Fig. 1 (panels A & B) the daily COVID-19 new cases have an obvious non-linear pattern with several wave peaks in all countries (for a better presentation, the countries are shown in different panels). The robust prediction of daily cases is of paramount importance because it would assist the policy makers to recognize the forthcoming waves directly. Thus, for predicting the daily cases one can expect that the linear models abate the accuracy rate as opposed to AI-based models since the AI techniques intend-to consider the non-linear relationships with a formidable and flexible discerning eligibility. Indispersion-through AI-based models, the hybrid ones usually enhance the accuracy rates; To rephrase it, the output of an AI-based model (i.e., ANN) is re-trained via a new training algorithm in order to increase the accuracy rate and optimize the weights attained by ANN. Thereby, one can anticipate that the hybrid models generate a robust forecasting of an output variable. Previous investigations have proved the superiority of ABC over other common metaheuristic algorithms including Particle Swarm Optimization (PSO), Genetic Algorithm (GA), Differential Evolution (DE) and Evolution Strategies (ES) in solving diverse optimization problems (Karaboga and Akay 2009; Krishnanand et al. 2009 ). Moreover, FA has showed a substantial efficiency in solving any hic et nunc problems . There is also evidence suggesting the superiority of FA over nature-inspired algorithms namely PSO, GA, Ant Colony Systems (ACS) which proves its reliability and robustness in solving all issues (Senthilnath et al. 2011; Ariyaratne and Fernando 2014,) . In that regard, this study aims to test the robustness of Artificial Neural Network-Artificial Bee Colony (henceforward ANN-ABC) and Artificial Neural Network-Firefly Algorithm (henceforth ANN-FA) in predicting COVID-19 new cases in Iran. Based on the initial conjectures, we express the null hypothesizes as following: H 0 There is no difference in forecasting robustness of ANN with ANN-ABC and ANN-FA. H' 0 There is no difference in forecasting robustness of ANN-ABC and ANN-FA models. The major contribution of this study can be categorized as follows: (1) Propounding two robust and parsimonious models for simulating the disease trend. (2) Achieving the (4) Finally, the proposed models will be validated by employing the reported daily data from other countries as well as the world data. 3 Research methodology Initially, the ANN models were developed via inspiring from biological neural network. In fact, ANN mimics the data processing procedure in the human brain and can learn from the surroundings. Because of their adaptivity, these models can solve nonlinear and complex problems with a greater velocity. Each ANN encompasses an input layer, hidden (middle) layer and an output layer. Neurons as the processing units, configure the bulk architectonic of an ANN. Hence, ANN consists of various sequential and parallel layers with interrelated nodes and neurons. The information is passed through synapses. Likewise, the items are connected to each other by using specific patterns. Conventionally, each node receives multiple inputs and combine them for representing its output. During generating the desired output, the network must be trained via a suitable algorithm (Maind and Wankar 2014) . Traditionally, back-propagation training process is widely used for arranging a feedforward network (Sazli 2006) . Since the output of each node can be the input of the subsequent node, in the training stage, first the generated output emits through the network. The ANN output is compared with the wished output. At this phase an error is disseminated. Then, by employing the network feedback (i.e., bias), the weights and bias can be adjusted. This process helps network to learn the existing pattern among input and output data (Omeara et al. 2018 ). In-the-interim, Multilayer Perceptron ANN with Levenberg-Marquardt training algorithm has gained substantial applications. Generally speaking, each Perceptron is a binary processing unit which classifies the achieved inputs. Then, the processed signals (inputs) will be directed for the next Perceptron. For the purpose of establishing the output, the weighted sum of incoming signals (inputs) must be processed. To do so, for the hidden and output layers, a stimulating function should be used. In that regard, the sigmoid transfer functions are mostly employed (Du and Stephanus 2018) . The produced output of every neuron is a function of weighted sum of the received inputs from the previous layers and an error value. Mathematically: In Eq. 1, i points to neuron i of the previous layer, j reffers to neuron j of the processing layer, W denotes weight and B stands for bias. As such, the activation faunction of neuron Z is obtained via the following sigmoid function: Figure 2 displays an ANN modeling flow chart with one hidden layer. Inspired from collective behavior of colonies, many AIbased models have been developed. The ABC algorithm is devised by Karaboga (2005) grounding on collective knowledge of honeybees. Otherwise stated, by division of labor each member of a hive has a simple job. Nonetheless, when these members collaborate with each other, they generate a complex behavior (Karaboga 2005) . The ultimate goal of hive's members adapted to be as collecting the nectar of flowers. The rich nectar sources can be perceived in the form of optimal choices. Evidently, sharing information respecting nectar quantity of each source will be imperative for maximizing the nectar collection. Specifically, in ABC algorithm there are three types of bees which comprise scout, employed and onlooker bees (Zabihi and Nasiri 2018) . Each has a specific task: Scout bees: Initially, a group of unemployed bees are chargeable for randomly searching new nectar sources. When the food source is examined and some nectar is collected, the bees move back into the hive. Via performing a waggle dance, they share data concerning nectar location and its quantity. This paves the way for other bees to conduct an investigation through the forage site. Employed bees: The employed bees are responsible for exploring the nectar sources. They collect nectar and data about site position as well as profitability of forages. Onlooker bees: There are some observer bees which processing the shared information regarding the forage sources. Due to the data, with a certain probability, they select a suitable forage for exploiting. All in all, the ABC algorithm includes the following stages (Kumar et al. 2019; Jiang et al. 2019; Zabihi and Nasiri 2018) : firstly, the colony is divided into two subgroups; Fifty percent of total bees can be considered as employed bees. The remaining half incorporates onlookers. In this step, for each nectar site (i.e., a feasible solution for the problem), there will be one employed bee. Secondly, the profitability (fitness value) of solutions must be determined. In this step, the recruited bees must search for new food sources (i.e., a more optimal solution). This searching process is based on the old solution which delegated firstly to the recruited bees. The probing will be random and controlled by a stochastic number ([ [-1,1]) so that the new solution will be generated in the locality of the old solution. Thus, the stride length of the employed bees is restrained. This can be formulated as follow: where S stands for the new solutions, O is the old solution, u denotes a stochastic figure between -1 and 1, d is a random vector between one and number of answers, as well as R r includes a series of random solutions for the problem. If the profitability of new solution (S) is greater than old solution (O), the new solution will be generated. Then the old answer is substituted by the new solution. Alternatively, the new answer can be overlooked and fined, where the fitness is lower than the old answer. Thirdly, as mentioned earlier, on the ground of shared data regarding site fitness, the onlooker bees select the new nectar reservoir with a probability. This can be formulated as follow: Hence, when a solution is selected, a new source will be generated (in the vicinity). If the new solution outperforms the previous answer, it will be substituted. As such, a new solution will be discarded and fined, if it dominated by the previous answer (Noroozi Ghaleini et al. 2019 ). In stage four, after employed bees infringe the model's restriction (e.g., number of probing which is determined previously by a threshold limit), the employed bees with nonenhanced solutions are converted into scout bees (Kumar et al. 2019) . By the definition, again, the scouts perform random exploring. Thusly, this simple method separates the rich solution from the sub-optimal ones via creating negative and positive feedbacks for the sub-optimal and optimal solutions, respectively. Figure 3 presents a modelling flowchart of ABC algorithm. Initially, the firefly algorithm (FA) is introduced by Yang during 2007-2008. As a metaheuristic-based algorithm, FA tries to solve complex problems via inspiring from the social behavior of fireflies (Yang and He 2013) . These insects disseminate many lights with special patterns. This helps them to explore food, finding mate and associating with their own species . For the sake of modeling, the following assumptions should be considered (Yang and He 2013): • It is assumed that the sex of all fireflies is similar. Thus, there will be no ground for sextual attractiveness between insects. • The amount of flashing lights is commensurate with their attractiveness. Additionally, it is hypothesized that there will be an inverse relationship between emitted lights (and consequently attractiveness) and fireflies' distance from each other. This means that if there exists a brighter firefly, the faint ones will be attracted to it. In the case of absenteeism of the shinier, fireflies maneuver in a randomly manner. • The brilliancy of each firefly is influenced by an objective function. In FA, based on physic principles, the light intensity of insects is incorporated with an objective function (Wahid et al. 2019) . To formally express the model, let c, b, b 0 , d and x be the absorption coefficient of light, attractiveness diversity, attractiveness where distance is zero, distance and fireflies' motion respectively. According to Yang and He (2013) , since the attractiveness of a firefly is a function of light intensity perceived by other neighboring fireflies, b can be defined as: As such, the distance of firefly i from j is defined as the Cartesian distance (i.e., kX i -X j k). In fact, the dimmer firefly will be attracted to the brighter firefly. The brightest firefly will be the superior target in the objective function. In FA, for optimizing the search space to find the best solution, the attractiveness and also the randomizing parameters are integrated. The motion of firefly i in-thedirection-of the brighter one j can be written as: In Eq. 6, a and e are the randomization parameter and a random vector of numbers attained by a routine Gaussian function or other distribution like Levy flight respectively (Yang and He 2013) . The first term of Eq. 6 shows that as the attractiveness (b) of the brighter firefly boosts the faint firefly i will be infatuated with it. The next term indicates that this is a random relation which helps FA for a more extensive searching in favor of finding the optimal solution. Via searching into literature, it is stated that a b 0 equals to one, an Alpha Have the finishing criteria been met? To evaluate the robustness of models, coefficient of determination (R 2 ) and root mean square error (RMSE) are employed. Statistically: where Y denotes actual value, Y * stands for anticipated value, Yis an average of actual values and n is the total number of observations. Obviously, a higher value of R 2 will demonstrate more predictability power. Conversely, a lower value of RMSE will guarantee the robustness of the developed models. In the configuration of this paper, two hybrid models including ANN-ABC and ANN-FA are developed. Firstly, an ANN is developed in MATLAB software. After initial training, for the sake of hybridizing, the model is re-trained with the new algorithms. The hybrid modeling procedure is presented by Fig. 5 . The daily COVID-19 new cases are set as output data. Also, since the input data are unknown or may not be existed, the number of days (time) is considered as input instances (Tamang et al. 2020; Rustam et al. 2020) . A sample of 523 daily observations at intervals 19 February 2020 and 25 July 2021 is collected from Our World in data. 392 of daily observations (75% of total output) are randomly used for training the network. The robustness of models will be tested and validated with 131 observations (25% of total dataset). In advance of hybrid modelling, first a Perceptron ANN with one hidden layer is developed. A single hidden layer will be adequate for tackling a sophisticate nonlinear problem (Karsoliya 2012) . Also, the Levenberg-Marquardt (LM) algorithm is selected for training the network. It has been indicated that the LM algorithm is one of the best and most flexible training algorithms and since in LM the computation of Hessian Matrix is averted it can be considered as the quickest backpropagation algorithm (Saba and Elsheikh 2020; Elsheikh et al. 2019) . To specify the optimal number of hidden neurons, the routine procedure in the literature is followed Noroozi Ghaleini et al. 2019; Zorlu et al. 2008) . In that regard, 24 ANN models are developed. On account of electing the optimal alternative, each model is classified with respect to R 2 and RMSE. In respect to R 2 , a greater value is desired. Hence, in this ranking system, the model with maximum R 2 has the highest score (i.e., 24 can be the maximum score). Inversely, a lower value of RMSE will be appropriate. Thus, the model with minimum value of RMSE gets the greatest score. Therefore, for each model the overall rank is attained by summing the two aforementioned figures for train and test stages, separately. Accordingly, in Table 1 the overall ranks attributable to the simulated models are calculated. As can be regarded, Model No. 16 with 17 neurons has acquired the maximum total rank. It can be claimed that R 2 (RMSE) in this model reaches to its maximum (minimum) in the training stage. From this point on, R 2 will decrease as the number of neurons increases. Subsequently, based on the overall rank, this model is picked as the optimal simulation. Figure 6 compares the predicted COVID-19 new cases with actual cases in the training and testing stages (the values are normalized). As depicted, the proposed model has achieved a satisfactory accuracy rate throughout the testing phase. Nevertheless, given the dire consequences of COVID-19, improving the accuracy rate will be unavoidable. In other respects, the ANN algorithms may not be able to find the optimal solution. Reaching to a local extremum cannot guarantee the optimization. The relative minimum trap shows that for example, RMSE is in its best possible value. However, in such cases, the utilization of a hybrid model assists in attaining the best possible value (i.e., the global extremum) (Noroozi Ghaleini et al. 2019) . Hence, in following the selected model is expanded into ANN-ABC and ANN-FA models. The proposed models will be validated with the world and country data and the performance of hybrid models will be assessed in each case. The ANN optimal prediction with 17 neurons is selected for developing ANN-ABC model. To do so, the optimum number of bees must be specified. It is a crucial stage, because as the number of bees increases, their effort to find the best solution also increases. As a logical expectation, the sub-optimal number of bees can decline the accuracy rate. On the other hand, a huge number of bees will increase computational time which may not be associated with a lower RMSE. Therefore, to find the desirable number of bees, the model is computed by regarding various number of bees and iterations. The results are indicated by Fig. 7 . The number of iterations is regarded 1000 and the bee's number is between 10 and 80. With 300 repetitions, almost all series will be converged. As shown in Fig. 7 , practically, for number of bees more than 40, the solution will not be improved. In this respect, the model with 40 bees is selected as the best ANN-ABC model. The results of predicting COVID-19 new cases with the proposed model are depicted by Fig. 8 . Accordingly, in comparison with ANN the ANN-ABC demonstrates a promising forecasting robustness in either train or test stages in Iran. We used ANN-ABC for simulating COVID-19 new cases in US (Fig. 9) , India ( Fig. 10) , Italy (Fig. 11) , Russia (Fig. 12 ) and the worldwide level (Fig. 13 ). In the train stage, the R 2 ranged from 95% (US and the world) to 0.99% (India and Russia). The R 2 of test stages also ranging from 95% (US and the world) to more than 99% (India and Russia) (Figs. 14, 15 ). As before, the proposed ANN model with 17 neurons is incorporated into FA. Generally, for optimizing the search area, the number of fireflies should be specified. Similar to ANN-ABC case, a large number of insects will increase the search area to find the optimal solution. However, this may increase the computational time. Thus, by considering 1000 repetitions as well as the number of fireflies diverging from 10 to 80, an investigation is conducted to establish the optimal model. As shown by Fig. 14, approximately after 300 iterations the models are converged. In this case, the ANN-FA with 30 fireflies is the best (i.e., with more than 30 fireflies the computational time will be increased while the solution is almost the same). Considering the proposed ANN-FA model with 30 fireflies, Fig. 15 displays the results. Correspondingly, with a R-squared more than 99% at both train and test stages the ANN-FA has obtained a promising robustness in approximating the COVID-19 confirmed new cases in Iran. We also employed this ANN-FA model for simulating the new cases data in US, India, Italy, Russia and the whole world (Figs. 16, 17, 18, 19, 20) . The R 2 differing from 95 to 99% at both test and train stages which confirms the appropriateness of ANN-FA for approximating COVID-19 new cases data. The corona virus, as a contemporary challenge in the world may never be eradicated (Skegg et al. 2021 Fig. 16 The proposed ANN-FA performance in predicting COVID-19 new cases with US data satisfactory performance and the ANN-FA exceeds ANN-ABC. Finally, in all instances the ANN-FA performance is higher than or at least similar to ANN-ABC which proves its outperformance. Presently, the COVID-19 pandemic with serious consequences and the rapid transition has involved Iran and other countries in crisis. Up till now, many researchers have provided various models including autoregressive integrated moving average, machine-learning methods, prophet models and other approaches for predicting the COVID-19 trends. Generally, each model has its pros and cons. Fig. 21 The overall R 2 for the ANN-ABC and ANN-FA in different countries Regarding the limitation of data, the objective of study and context, selecting the best model may not be possible per se. Currently, the hybrid ANN models with ABC and FA have been utilized in various fields and showed a remarkable robustness. Hence, as part of this study, we proposed two hybrid ANN-based models for achieving the maximum forecasting robustness of COVID-19 new cases in Iran. To formally express the results, we reject the null hypothesizes. The two hybrid models outperformed the ANN; Thus, H 0 must be rejected. As the same way, the ANN-FA outperformed ANN-ABC; Therefore, H 0 ' can be rejected. It ought to be remarked that such models should be used for short-term predicting. Otherwise stated, the actions or inactions of policymakers and the extent of public cooperation to control the disease, can adjust the outbreak trend in longer times. However, one of the strengths of our proposed models was their parsimony. They also can be used for scenario making suchlike vaccination or quarantine by adding these variables as input data or initializing the impact on the new cases COVID-19 data. In sum, according to the results, we conclude that both ANN-ABC and ANN-FA are fairly strong to forecast pandemic but ANN-FA can be utilized as the most promising technique for predicting COVID-19 new cases in Iran. On the accuracy of ARIMA based prediction of COVID-19 spread Forecasting the spread of the COVID-19 pandemic in Saudi Arabia using ARIMA prediction model under current public health interventions A comparative study on nature inspired algorithms with firefly algorithm Madaan V (2021) Prediction and forecasting of COVID-19 outbreak using regression and ARIMA models Forecasting the dynamics of cumulative COVID-19 cases (confirmed, recovered and deaths) for top-16 countries using statistical machine learning models: autoregressive integrated moving average (ARIMA) and seasonal auto-regressive integrated moving average (SARIMA) Prediction of daily COVID-19 cases in European countries using automatic ARIMA model A data analytics approach for COVID-19 spread and end prediction (with a case study in Iran) Estimation of COVID-19 prevalence in Italy Water quality prediction model of a water diversion project based on the improved artificial bee colony-backpropagation neural network Comparison of an artificial neural network and Gompertz model for predicting the dynamics of deaths from COVID-19 in México Levenberg-Marquardt neural network algorithm for degree of arteriovenous fistula stenosis classification using a dual optical photoplethysmography sensor Modeling of solar energy systems using artificial neural network: a comprehensive review Economic effects of coronavirus outbreak (COVID-19) on the world economy A combination of artificial bee colony and neural network for approximating the safety factor of retaining walls Sakthivel R (2021) Prediction of covid-19 growth and trend using machine learning approach Forecasting outbreak of COVID-19 in Turkey; comparison of Box-Jenkins, Brown's exponential smoothing and long short-term memory models Turn to the internet first? Using online medical behavioral data to forecast COVID-19 epidemic trend Cultural challenges: the most important challenge of COVID-19 control policies in Iran An improved artificial bee colony-BP neural network algorithm in the short-term wind speed prediction Prediction of ecological pressure on resource-based cities based on an RBF neural network optimized by an improved ABC algorithm Covid-19 in Iran: forecasting pandemic using deep learning An idea based on honey bee swarm for numerical optimization A comparative study of artificial bee colony algorithm Approximating number of hidden layer neurons in multiple hidden layer BPNN architecture Designing a hybrid reinforcement learning based algorithm with application in prediction of the COVID-19 pandemic in Quebec Gradient-based grey wolf optimizer with Gaussian walk: application in modelling and prediction of the COVID-19 pandemic Predicting the epidemic curve of the coronavirus (SARS-CoV-2) disease (COVID-19) using artificial intelligence A new approach for estimation of rock brittleness based on non-destructive tests Comparative study of five bio-inspired evolutionary optimization techniques A systematic review on firefly algorithm: past, present, and future Arrhenius artificial bee colony algorithm Research paper on basic of artificial neural network The impact of Covid-19 on higher education around the world Nonlinear neural network-based forecasting model for predicting COVID-19 cases Applications of deep learning neural networks to satellite telemetry monitoring A python-based support vector regression model for prediction of COVID19 cases in India Applying relationship science to evaluate how the COVID-19 pandemic may impact couples' relationships Forecasting COVID-19 daily cases using phone call data Spatial prediction of COVID-19 epidemic using ARIMA techniques in India COVID-19 future forecasting using supervised machine learning models Forecasting the prevalence of COVID-19 outbreak in Egypt using nonlinear autoregressive artificial neural networks The COVID-19 outbreak in Iran A brief review of feed-forward neural networks. communications faculty of sciences university of Ankara series A2-A3 Clustering using firefly algorithm: performance study Short-Term forecasting of daily confirmed COVID-19 Cases in Malaysia using RF-SSA model What we can learn from COVID-19 outbreak in Iran about the importance of alcohol use education Future scenarios for the COVID-19 pandemic Social stigma in the time of coronavirus disease 2019 Coronavirus COVID-19 disease, mental health and psychosocial support COVID-19 battle during the toughest sanctions against Iran Modeling and forecasting number of confirmed and death caused COVID-19 in IRAN: A comparison of time series forecasting methods Forecasting of Covid-19 cases based on prediction using artificial neural network curve fitting technique COVID-19 cases prediction by using hybrid machine learning and beetle antennae search approach Impact of covid-19 on environment and society Using improved firefly algorithm based on genetic algorithm crossover operator for solving optimization problems Neural network powered COVID-19 spread forecasting model Real-time neural network-based predictor for cov19 virus spread Deciphering the impact of COVID-19 pandemic on food security, agriculture, and livelihoods: a review of the evidence from developing countries Announced new COVID-19 deaths by country Deep neural network correlation learning mechanism for CT brain tumor detection Impact of COVID-19 pandemic on mental health in the general population: a systematic review Firefly algorithm: recent advances and applications Artificial bee colony algorithm-neural networks for S-system models of biochemical networks approximation How the COVID-19 pandemic effected economic, social, political, and cultural factors: A lesson from Iran A COVID-19 pandemic artificial intelligence-based system with deep learning forecasting and automatic statistical data acquisition: development and implementation study A novel history-driven artificial bee colony algorithm for data clustering Predicting COVID-19 in China using hybrid AI model Employing artificial bee colony and particle swarm techniques for optimizing a neural network in prediction of heating and cooling loads of residential buildings COVID-19 cases prediction by using hybrid machine learning and beetle antennae search approach Prediction of uniaxial compressive strength of sandstones using petrography-based models Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations Acknowledgements The authors are grateful to Tehran University of Medical Sciences (TUMS) for providing access to the professional software and web data. Authors' contribution All authors have participated into drafting. MJ.Shaibani and S.Emamgholipour performed software analysis. S.Sadate Moazeni had substantial contribution in developing ANN-FA.Funding This study has not had any financial supports.Data availability statement Data used in the simulations can be found at https://ourworldindata.org/coronavirus-source-data.Code availability The source codes are inherently exclusive and might-be provided with constraints. Conflict of interests We have no conflict of interest to declare. We confirm that this research is original. Also, we have read this manuscript and agree with its dissemination.