1 Introduction

COVID-19, which emerged in December 2019, has turned into a pandemic by affecting the whole world. This has influenced millions of people in more than 200 countries. According to the WHO, there are more than 150 million confirmed cases and more than 3 million deaths. This situation has caused negativities in terms of economy, sociology, psychology and business sector, primarily the health sector.

It is important to know the course of the pandemic to take precautions against COVID-19 of governments and institutions. In other words, it is necessary to shed light on the future by analyzing the information in the past. Thus, more realistic policies will be realized. As this is important, some scientists have focused on predictive studies on COVID-19 data. According to the characteristics of the study, they used different parameters such as daily deaths and number of cases, number of carriers, environmental parameters, mobility, geographical location, age and gender [1].

Within the scope of the study, it is aimed to study on the estimation of the number of COVID-19 cases in the future. It is possible to use traditional and artificial intelligence-based methods in predicting COVID-19 data. The sudden changes in the number of COVID-19 cases from day to day reveal the necessity of an artificial intelligence-based adaptive method. Neuro-fuzzy models are one of the effective methods used in prediction and modeling. When the literature is examined, it is seen that it is used in the solution of many real-world problems [2]. Especially for effective results with neuro-fuzzy, a successful training process is required. In particular, meta-heuristic algorithms are used extensively in neuro-fuzzy training due to their success [3]. FPA is one of the success heuristic algorithms and has been successfully applied in the solution of many difficult problems [4, 5]. In this study, a powerful approach based on neuro-fuzzy and FPA is proposed for estimating the number of COVID-19 cases. Neuro-fuzzy training, which is one of the difficult problems, is carried out with FPA, which attracts attention with its success in the literature. It will be useful to examine the studies in the literature to understand the effectiveness of the proposed method. For this reason, a detailed literature study on neuro-fuzzy, FPA and COVID-19 is presented:

The studies on prediction of COVID-19: Alazab et al. [6] proposed an approach based on CNN to detect COVID-19 patients by using real data obtained from chest X-ray images. At the same time, they used the PA, ARIMA model and LSTM to estimate the number of COVID-19 cases and deaths. Magesh et al. [7] applied some approaches based on susceptible, infected and recovered (SIR) and the RNN with LSTM for predicting and classifying COVID-19 cases. Arora et al. [8] applied some deep learning methods such as deep LSTM, convolutional LSTM and bidirectional LSTM to analyze the cases in 32 states of India. Torrealba-Rodrigue et al. [9] used Gompertz, logistic and ANNs models for prediction of COVID-19 cases in Mexico. Pinter et al. [10] proposed a hybrid method based on ANFIS and multi-layered perceptron-imperialist competitive algorithm to predict the COVID-19 data belonging to Hungary. Pal et al. [11] suggested an approach based on ANN and LSTM to estimate the risk category belonging to a country. The performance of their approach was compared with different methods in the literature such as liner regression, lasso linear regression, ridge regression, Elastic Net, LSTM-FCNS, residual RNN, GRU and GRU + Baysian. Elsheikh et al. [12] applied ARIMA, NARANN and LSTM models to estimate the number of cases and deaths belong to countries such as Brazil, India, Saudi Arabia, South Africa, Spain and USA. Behnood et al. [13] proposed an approach (ANFIS-VOA) based on ANFIS and VOA to model the spread of the COVID-19. The performance of ANFIS-VOA was compared with linear regression and ANFIS. It has been observed that ANFIS-VOA is more effective than linear regression and ANFIS. Namasudra et al. [14] proposed a new nonlinear autoregressive (NAR) neural network time series (NAR-NNTS) model for predicting COVID-19 cases. SCG, LM and BR algorithms was used for training NAR-NNTS. It has been reported that the effective results were obtained with NAT-NTS based on LM. Katris [15] applied ETS, ARIMA, FFNN and MARS to track the COVID-19 epidemic in Greece. Abbasimehr and Paki [16] suggested a hybrid approach based on multi-head attention, LSTM and CNN for forecasting COVID-19 time series belongs to ten countries.

The studies on FPA: FPA, modeling the pollination process, is one of the popular meta-heuristic algorithms and has been used to solve many real-world problems [4]. Alam et al. [17] used FPA proposed for solar PV parameter estimation. The performance of FPA was compared with different methods such as Newton, LMSA, MPCOA, CS, ABSO, ABC and PS. It has been reported that FPA was successful in terms of convergence speed, convergence time and solution quality. Nabil [18] proposed an enhanced version of FPA to solve global optimization problems and applied on 23 benchmark problems. Nguyen et al. [19] used an improved FPA for solving some optimization problems in WSNs. Singh and Salgotra [20] utilized a FPA for LAA design and compared the performance of FPA with GA, PSO, CS, TS, BBO. They reported that the FPA was effective in solving the related problem. Liang et al. [21] proposed an improved FPA (IFPA) and used a method based on IFPA and BPNN for the intelligent diagnosis of natural gas pipeline defects. In their study, IFPA was utilized optimize some values of BPNN. Zhou et al. [22] suggested a DFPA to solve spherical traveling salesman problem. The performance of DFPA was compared with some methods such as GA, GA + 3opt, GA + 3opt + 2opt and TS. Chiroma et al. [23] realized training of NN by utilizing FPA to predict OPEC petroleum consumption. Niu et al. [24] suggested a hybrid algorithm based on FPA and WDOA for modeling the boiler thermal efficiency. In their study, the tuning of FLN was realized via proposed hybrid algorithm. Chakraborty et al. [25] realized the training of NN by using a hybrid approach based on FPA and GSA to solve classification problem. Lei et al. [26] used a FPA for color image quantization. The performance of FPA was compared with some methods such as ABC, PSO, FCM, K-means and SFLA. Chatterjee et al. [27] trained a NN model via FPA for rainfall prediction. Shehu and Çetinkaya [28] realized the training of FFNN by using FPA for short-term load flow forecasting. The performance of their method was compared with FNN model and support vector regression.

The studies on Neuro-Fuzzy: There are neuro-fuzzy models such as IT2FNN, GT2FS, SONFIN, ANFIS and FNNs [2]. Neuro-fuzzy is used extensively in science, engineering, health and social sciences. It has an important place especially in prediction and modeling [29, 30]. In order to get effective results in estimation and modeling with neuro-fuzzy, a successful training process is required. For this, it is seen that derivative-based and heuristic algorithm-based algorithms are used in the literature [3]. Karaboga and Kaya [31] used ANFIS and ABC algorithm to estimate the number of foreign visitors coming to Turkey from nine different countries. The performance of ABC algorithm was compared with PSO, GA, DE and HS. Rezaeianzadeh et al. [32] utilized ANN, ANFIS, MLR and MNLR to forecast maximum daily flow. Boyacioglu and Avci [33] used an ANFIS model for stock market prediction belonging to ISE. Barak and Sadegh [34] proposed an approach based on ARIMA and ANFIS for forecasting energy consumption. Kharb et al. [35] suggested a MPPT controller based on ANFIS. Bagheri et al. [36] introduced an approach based on ANFIS, quantum-behaved PSO (QPSO), DTW and WT to forecast market trends. In their study, QPSO was used to tune the parameters of the membership functions of ANFIS. Zangeneh et al.[37] proposed a hybrid learning method based on DE and GD algorithm for ANFIS to identify of nonlinear dynamic systems. Tien et al. [38] suggested ANFIS models including CA, BA and IWO for flood susceptibility modeling.

As noted earlier, some of the COVID-19 problems studied in the literature are based on prediction and modeling. One of the methods used to solve these problem types is neuro-fuzzy. Al-Qaness[39] evaluated the performance of four artificial intelligence-based models such as standard ANFIS, ANFIS-based PSO, ANFIS-based MPA and ANFIS-based improved MPA (CMPA) for predicting the number of COVID-19 cases in Russia and Brazil. It has been emphasized that the CMPA-based method is more effective than others. Al-Qaness et al.[40] used a training algorithm (PSOSMA) including PSO and SMA and proposed a model (PSOSMA-ANFIS) based on PSOSMA and ANFIS to analyze air quality of Wuhan City. The performance of PSOSMA was compared with some approach such as SMA, PSO, GA, standard ANFIS, SCA and SSA. It was reported that PSOSMA was more effective than other methods in solving the related problem. Zivkovic et al. [41] used a novel beetle antennae search in training ANFIS for predicting COVID-19 cases in China and USA. Saif et al. [42] trained ANFIS by utilizing mutation-based bees algorithm (mBA) for estimation of COVID-19 data in India and USA. The performance of their proposed method was compared with GA, DE, HS, TLBO, FF, PSO and BA-based ANFIS approaches. It was stated that mBA was more effective in solving the related problem. Chowdhury et al. [43] used ANFIS and LSTM to predict number of cases in Bangladesh. Parvez et al. [44] compared the performance ANFIS and ARIMA in predicting COVID-19 confirmed cases in Bangladesh. Alsayed et al. [45] used a model based on ANFIS and GA for short-time forecasting of the number of infected cases in Malaysia. Al-Qaness et al. [46] realized the training ANFIS by using MPA to estimate the number of COVID-19 cases in Italy, Iran, Korea and the USA.

In order to shed light on the future, it is seen that different methods are used to estimate the number of COVID-19 cases. One of these methods is neuro-fuzzy. Neuro-fuzzy models have a strong place in solving real-world problems. A successful training algorithm is required to achieve effective results with neuro-fuzzy models. Therefore, FPA has been used for neuro-fuzzy training in this study. As detailed above, it is seen that some ANFIS-based studies have been conducted specifically for COVID. It is possible to criticize these studies in some ways. The number of COVID-19 cases varies according to countries. Therefore, the COVID-19 case graphs are generally different for each country. In fact, this shows that each country is a different problem. Therefore, it is necessary to examine the situation of different countries to show that neuro-fuzzy models are effective in predicting the number of COVID-19 cases. In the studies mentioned above, the situation of very few countries has been examined. A more detailed study is required to say that neuro-fuzzy models are successful in predicting the number of COVID-19 cases, due to the different characteristics of the countries. It is seen that different algorithms are used in neuro-fuzzy training. To show that these algorithms are successful, they must be compared with different algorithms. The success of the training algorithm is understood in this way. This seems to lack in most of the aforementioned studies. One of the other important shortcomings is not evaluating the performance of MFs. One of the important aspects affecting the performance of the neuro-fuzzy model is MFs. The performance of MFs varies according to the problem. In general, models are created through a MF that is considered successful. In fact, this prevents obtaining more effective results with neuro-fuzzy. Another important point is that the dataset is small and insufficient. In some studies on COVID-19, it is seen that the success of neuro-fuzzy models is measured with small-scale dataset. Sufficient dataset is required to model a dynamic system that is constantly changing. This study is carried out in order to eliminate the basic deficiencies stated here. This study makes important contributions to the literature. These are listed below:

  • In ANFIS training, the performance of FPA is analyzed in detail. The results will shed light on future studies based on FPA and ANFIS.

  • ANFIS is trained with FPA to estimate the number of COVID-19 cases. The performance of a hybrid method based on FPA in estimating the number of COVID-19 cases has been studied in detail. The parameters affecting the performance are evaluated.

  • In addition to FPA, four more heuristic algorithms are used in ANFIS training. It is one of the important studies that compares the performance of different heuristic algorithms in ANFIS training.

  • For the first time, COVID-19 cases belonging to twenty countries are analyzed in detail. In addition to, the estimation of the number of COVID-19 cases is realized as daily, weekly and monthly. One of the most comprehensive studies has been conducted in estimating the number of COVID-19 cases.

  • The impact of MFs has been examined in detail. In this respect, it is one of the most detailed studies in the literature.

This study is continuing as follows. The methodologies such as FPA and neuro-fuzzy are described in Sect. 2. Simulation results is given in Sect. 3. Section 4 includes discussion. The conclusion is given in Sect. 5.

2 Methodologies

This study is based on two basic methodologies. These are the FPA and neuro-fuzzy. Namely, FPA is used for neuro-fuzzy training. Therefore, both methods are introduced in this section.

2.1 Flower pollination algorithm (FPA)

The main purpose of flowers is to reproduce, and the most important source of reproduction is pollination. Pollination is indispensable for plants. Pollination realizes through animals such as bees, insects and birds. Pollination occurs in two ways in nature. These are abiotic and biotic. In biotic pollination, animals such as insects, bees and birds provide pollen transfer. Namely, the animals are pollinators. Approximately 90% of pollination in nature occurs in this way. In abiotic pollination, pollination occurs by natural events such as wind and diffusion in water. Pollination is divided into two as self-pollination or cross-pollination. Cross-pollination occurs from pollen of a flower of a different plant. Self-pollination uses same flower or different flowers of the same plant [47]. The pollination process in nature is simulated by Abdel-Basset and Shawky [4] as in Fig. 1.

Fig. 1
figure 1

The pollinators and pollination types [4]

Yang modeled the pollination process in nature and developed the FPA [47]. It has some rules that explain the process of abiotic/biotic pollination and self-pollination/cross-pollination. These rules are given below:

  • Rule 1: Biotic and cross-pollination refers to the global pollination process. The movement of pollinators realizes according to the Levy distribution.

  • Rule 2: Abiotic and self-pollination corresponds to the local pollination process.

  • Rule 3: Flower constancy can be considered as the reproduction probability is proportional to the similarity of two flowers involved.

  • Rule 4: Local and global pollination processes are controlled by a switch probability p ∈ [0, 1].

The process of FPA is built on global and local pollination, taking into account the rules stated here. The pseudo code of FPA is given in Fig. 2. Global pollination can occur over very long distances through animals such as insects, bees and birds. Global pollination process is modeled mathematically via (1).

$${{\text{x}}}_{{\text{i}}}^{{\text{t}}+1}={{\text{x}}}_{{\text{i}}}^{{\text{t}}}+{\text{L}}\left({{\text{x}}}_{{\text{i}}}^{{\text{t}}}-{{\text{g}}}_{*}\right)$$
(1)

\({{\text{x}}}_{{\text{i}}}^{{\text{t}}}\) expresses the pollen i or solution vector xi at iteration t. \({{\text{g}}}_{*}\) is the current best solution found among all solutions at the current iteration. L is a step size. It is calculated according to levy distribution.

Fig. 2
figure 2

Pseudo code of FPA [47]

The local pollination process realizes on similar species of plants. It is mathematically formulated as given in (2).\({{\text{x}}}_{{\text{j}}}^{{\text{t}}}\) and \({{\text{x}}}_{{\text{k}}}^{\mathrm{t }}\) are pollens from the different flowers of the same plant species. \(\in\) is obtained from a uniform distribution in [0,1].

$${{\text{x}}}_{{\text{i}}}^{{\text{t}}+1}={{\text{x}}}_{{\text{i}}}^{{\text{t}}}+\in \left({{\text{x}}}_{{\text{j}}}^{{\text{t}}}-{{\text{x}}}_{{\text{k}}}^{{\text{t}}}\right)$$
(2)

The functioning of the local and global pollination process in FPA depends on the switch probability (p). The value of this parameter determines the efficiency of the processes. In FPA, pollination in nature is modeled and global pollination is more intense in nature. When p > 0.5, global pollination probability increases. Otherwise, the probability of local pollination will increase. This relationship directly affects the solution quality. Therefore, the ideal value can vary according to the types of problems. Finding the most suitable p value can increase the solution quality.

2.2 Neuro-fuzzy model

Neuro-fuzzy models use the inference feature of fuzzy logic and the learning ability of ANN. There are many neuro-fuzzy models suggested in the literature [2]. In this study, ANFIS, which neuro-fuzzy model developed by Jang [48] is used. This model consists of 2 parts: the antecedent and conclusion. These parts are connected to each other by IF–THEN rules. ANFIS has a strong and dynamic structure. Due to its structure, it is used to solve many problems in different fields [29]. In order to achieve effective results with ANFIS, the training process is important and a successful training algorithm is required. In particular, meta-heuristic algorithms are used extensively because they have advantages according to derivative-based methods. PSO, ABC algorithm and DE are some of the meta-heuristic algorithms that are heavily used in training ANFIS [3]. As seen in Fig. 3, it consists of 5 layers:

Fig. 3
figure 3

The ANFIS structure that has two inputs and one output

Layer 1 is named as the fuzzification layer. In this layer, MFs are used and fuzzy clusters are obtained from input values. Membership values in the range of [0,1] are calculated by utilizing MF. The formal structure of MF is important in the formation of the membership value. {a, b, c} parameters play an active role in the formation of the shape of MF. These parameters are called as premise/antecedent parameters. The calculation of the membership value according to gbellmf is formulated in (3) and (4). μ refers to the value of membership, and x is the value of the input.

$${\upmu }_{{{\text{A}}}_{{\text{i}}}}\left({\text{x}}\right)={\text{gbellmf}}\left({\text{x}};{\text{a}},{\text{b}},{\text{c}}\right)=\frac{1}{1+{\left|\frac{{\text{x}}-{\text{c}}}{{\text{a}}}\right|}^{2{\text{b}}}}$$
(3)
$${{{\text{O}}}_{{\text{i}}}^{1}=\upmu }_{{{\text{A}}}_{{\text{i}}}}\left({\text{x}}\right)$$
(4)

Layer 2 is named as the rule layer. Firing strengths (wi) of each rule are calculated by using the membership values obtained in the previous layer. As stated in (5), it is obtained by multiplying the membership values. The number of rules is found by multiplying the numbers of the MF belonging to the inputs.

$${{{\text{O}}}_{{\text{i}}}^{2}={{\text{w}}}_{{\text{i}}}=\upmu }_{{{\text{A}}}_{{\text{i}}}}\left({\text{x}}\right).{\upmu }_{{{\text{B}}}_{{\text{i}}}}\left({\text{y}}\right)$$
(5)

Layer 3 is named as the normalization layer. Normalized firing strengths are calculated as in (6) for each rule by using the firing strengths obtained in the previous layer.

$${{\text{O}}}_{{\text{i}}}^{3}=\overline{{{\text{w}} }_{{\text{i}}}}=\frac{{{\text{w}}}_{{\text{i}}}}{{{\text{w}}}_{1}+{{\text{w}}}_{2}+{{\text{w}}}_{3}+{{\text{w}}}_{4}},\mathrm{ i}\in \left\{1,\mathrm{ 2,3},4\right\}$$
(6)

Layer 4 is named as the defuzzification layer. The weighted value of each rule is calculated by using the normalized firing strengths obtained in the previous layer. As shown in (7), a first order polynomial is also utilized in determining of the weighted value. {pi, qi, ri} parameters in the equation of the first order polynomial are named as consequence/conclusion parameters.

$${{\text{O}}}_{{\text{i}}}^{4}=\overline{{{\text{w}} }_{{\text{i}}}}{{\text{f}}}_{{\text{i}}}=\overline{{{\text{w}} }_{{\text{i}}}}\left({{\text{p}}}_{{\text{i}}}{\text{x}}+{{\text{q}}}_{{\text{i}}}{\text{y}}+{{\text{r}}}_{{\text{i}}}\right)$$
(7)

Layer 5 is named as the summation layer. The actual output of ANFIS is calculated by summing the outputs of each rule, as in (8).

$${{\text{O}}}_{{\text{i}}}^{5}=\sum_{{\text{i}}}\overline{{{\text{w}} }_{{\text{i}}}}{{\text{f}}}_{{\text{i}}}$$
(8)

2.3 Simulation results

In this study, COVID-19 cases belonging to twenty countries including USA, India, Brazil, Russian, France, UK, Italy, Spain, Argentina, Germany, Colombia, Mexico, Poland, Turkey, Iran, Peru, Ukraine, South Africa, the Netherlands and Indonesia are analyzed. The analyzed country information is presented in Table 1. Analyzes are carried out daily, weekly and monthly. An FPA-based neuro-fuzzy approach is used for them. In this section, information about used data, creation of neuro-fuzzy models, training and testing process and the results is presented.

Table 1 The examples used in estimation

2.4 Data and model preparation

Daily data between 1 April 2020 and 31 December 2020 is used. The data are obtained from the website of the WHO. Data are converted into time series. Due to the large-scale value of the data, they are normalized in the range of [0, 1] by using (9). \({{\text{x}}}_{{\text{n}}}\) is the scaled value of x in the interval [0, 1].\({{\text{x}}}_{{\text{min}}}\) corresponds to the minimum value of x. \({{\text{x}}}_{{\text{max}}}\) refers to the maximum value of x.

$${{\text{x}}}_{{\text{n}}}=\frac{\left({\text{x}}-{{\text{x}}}_{{\text{min}}}\right)}{\left({{\text{x}}}_{{\text{max}}}-{{\text{x}}}_{{\text{min}}}\right)}$$
(9)

The estimation of the number of COVID-19 cases is realized as daily, weekly and monthly by using time series data. The relevant time series is transformed into a dataset consisting of inputs and output. It is tried to predict future data by using the past data. Therefore, each dataset corresponds to a dynamic system. These systems are given in Table 2. Two systems (S1,1 and S1,2) are used for daily estimation of the number of cases. S1,1 has two inputs as y(t-1) and y(t-2). S1,2 has three inputs: y(t-1), y(t-2) and y(t-3). The analyzes are carried out on four systems such as S2,1, S2,2, S2,3 and S2,4 for weekly prediction. S2,1 has two inputs as y(t-7) and y(t-8). Also, S2,2 consists of two inputs as y(t-7), y(t-14). There are three inputs in S2,3. These are y(t-7), y(t-8) and y(t-9). Likewise, S2,4 has three inputs as y(t-7), y(t-14) and y(t-21). As in the weekly forecast, four systems are also used in the monthly forecast. These are S3,1, S3,2, S3,3 and S3,4. The inputs of S3,1 are y(t-30) and y(t-31). y(t-30) and y(t-45) belong to S3,2. S3,3 has three inputs as y(t-30), y(t-31), y(t-32). y(t-30), y(t-45) and y(t-60) are also the inputs of S3,4. All systems use one output as y(t). All systems are analyzed on F1 to determine the most effective system in daily, weekly and monthly forecast. The results are presented in Table 2. When S1,1 and S1,2 are compared, S1,2 has better training performance. For all that, according to the test results, S1,1 is more successful than S1,2. When evaluated the test results together, there is a clear difference between the test results. S1,1 is slightly better. S2,3 has the best training performance in the weekly forecast. At the same time, S2,3 has the worst test training performance. The best test result is found by using S2,1 with an obvious advantage. So, S2,1 is evaluated as more successful. It is seen that the best result in monthly estimation is found with S3,2. In light of these evaluations, the obtained best systems in daily, weekly and monthly estimation of the number of cases are presented in Table 3. These systems are used in all estimation and modeling studies. In the next process, all the results are obtained according to these systems.

Table 2 Comparison of performance of different systems for forecasting daily, weekly and monthly
Table 3 Systems used for forecasting daily, weekly and monthly in the study

Approximately 80% of the dataset is used for the training process. The remaining dataset is also utilized for the test process. (10) and (11) are used to determine the training and test dataset. i is the index value of the dataset. n is the number of elements of the dataset. Mod operation is applied to the value of i. In this way, the test dataset is evenly distributed throughout all dataset. This approach aims to create a more balanced training and test results. At the same time, 20% of the data are reserved for testing with this approach.

$$f={\text{mod}}\left({\text{i}},5\right),\mathrm{ i}\in [1,{\text{n}}]$$
(10)
$${{\text{Data}}}_{{\text{Type}}}=\left\{\begin{array}{c}{{\text{Data}}}_{{\text{Test}}},\, f=0\\ {{\text{Data}}}_{{\text{Train}}},\, f\ne 0\end{array}\right.$$
(11)

S1, S2 and S3 systems have two inputs and one output. So, neuro-fuzzy models consisting of two inputs and one output are used. In neuro-fuzzy training, the type and number of MFs are factors that affect performance. Therefore, the effect of MFs on performance is examined and three different MFs are utilized. These are gbellmf, trimf and gaussmf. Two and three MFs are used for each input. Thus, the effect of neuro-fuzzy models consisting of 4 and 9 rules on performance is observed. MSE is used as performance criterion in neuro-fuzzy training. Mathematical equation of MSE is given in (12).\({{\text{y}}}_{{\text{i}}}\) is the actual output and \(\overline{{{\text{y}} }_{{\text{i}}}}\) is the predicted output.

$${\text{MSE}}=\frac{1}{{\text{n}}}\sum_{{\text{i}}=1}^{{\text{n}}}{\left({{\text{y}}}_{{\text{i}}}-\overline{{{\text{y}} }_{{\text{i}}}}\right)}^{2}$$
(12)

The blog diagram of the training process carried out using FPA to identify the S1, S2 and S3 systems is given in Fig. 4. Here, the error is calculated using the difference between the output found using the proposed method and the output of the real system. The main purpose here is to reduce the value of the error to an acceptable level. In order to reduce the error value, the parameters of ANFIS are updated through FPA in each iteration.

Fig. 4
figure 4

Block diagram of the FPA-based ANFIS training process for a S1 b S2 c S3

Population size and maximum number of generations are used as 20 and 2500, respectively. The switch probability, which is one of the important control parameters of FPA, is determined as 0.8. Each application is run 30 times in terms of the significance of the results and statistical analysis. The mean error and standard deviation are calculated according to this. Within the scope of the study, the performance of FPA is compared with heuristic algorithms such as PSO, HS, BA and DE. The control parameter values used for these meta-heuristic algorithms are given in Table 4.

Table 4 The control parameters values used

Hyperparameters have a great impact on ANFIS training. The type of MFs, number of MFs, numbers of rule, number of parameters to be optimized and the maximum number of iterations constitute the hyperparameters. In particular, results were obtained on different hyperparameter values to examine the effect of hyperparameters on the result. Studies have been carried out on three different MF types. These are gbellmf, trimf and gaussmf. Applications were carried out using both two and three MFs for each input. The number of MFs directly affects both the number of rules and the number of parameters to be optimized. The value of the maximum number of iterations, which is the stopping criterion, was taken as 2500.

3 Results

The results obtained using FPA in the daily, weekly and monthly estimation of the number of COVID-19 are given in Table 5. The analysis of the results for the daily forecast is as follows: In F1, the best training error value is obtained by using 3-Trimf. However, 3-Trimf does not achieve the same success in the test results. The worst test result for F1 is found by utilizing 3-Trimf. The test error values of other MFs are close together and better than 3-Trimf. When the training and test results are examined in F2, it is seen that the number and type of MF do not significantly affect the result. On the other hand, the training results found with 3-Trimf are more successful than the others. The best training and test results in F3 are obtained using Trimf. Although the best training error value is achieved with 3-Gbellmf in F4, the results obtained with all MFs are similar in general. The best test results are found using Gaussmf. Although the best training error value is found with 3-Trimf in F5, the test error values obtained with Gbellmf are better. In F6, the best test error value is obtained with 3-Gaussmf. On the other hand, the best training and the worst test error values are found with 3-Trimf. A similar situation to F6 is also observed in F7. The training result achieved with 3-Trimf in F7 is clearly better than the others. But it is also bad in test error value. It is observed that the test error values found using 2-Gaussmf and 2-Gbellmf are better. The best error value is found 0.00869519 with 3-Trimf in F8. The next best error value is 0.00903359. Namely, 3-Trimf is more successful in the training process. While the best test error value is in 2-Gbellmf, the worst test error values are found in Gaussmf. In F9, the similar training results are found with MFs except 3-Trimf. The best training error value is in 3-Trimf. On the other hand, the unacceptably worst test error value also belongs to 3-Trimf. As with F9, while 3-Trimf is good in the training process in F10, it is poor in the testing process. In F11, the best training error value is found with 3-Trimf. It is seen that Trimf and Gaussmf are effective in test error values. In F12, the best training error value is obtained by using Gbellmf. However, Trimf is more effective in the test process. A very effective training error is reached as 0.00266541 with 3-Trimf in F13. The best test error is found by utilizing 3-Gaussmf. The effective training error values are obtained with 3-Gbellmf and 3-Trimf in F14. Also, Gaussmf MFs give better results in the testing process. More effective training results are achieved when Trimf MFs are used in F15. In the testing process, Gaussmf and Gbellmf MFs are more effective than Trimf. While 3-Trimf is very successful in the training process in F16, it could not show the same success in the testing process. The best test error value is found with 2-Gaussmf. When viewed in terms of the training process in F17, generally effective results are found with all MFs. In the test process, the success statues of MFs vary. In F18, the best training error value belongs to 3-Trimf. Gbellmf MFs are more effective at test error value. Gbellmf and Trimf are more effective in terms of training error value in F19. As the test error value, the best result is found with 2-Gaussmf. In F20, the best training and the worst test error value are found with 3-Trimf. The best test error value is also obtained by using 2-Gbellmf.

Table 5 The results obtained in ANFIS training by using FPA

The analysis of the results for the weekly forecast is as follows: The best training and test error values are found using the 3-Trimf in F1. However, it has been observed that effective results are obtained with 3-Gbellmf. The effective training results are achieved with 3-Trimf in F2. On the other hand, the worst test results are found with 3-Trimf. 3-Gbellmf has the best test result. While the best training error values in F3 are obtained by using Trimf, the best test error values are found with Gaussmf. The successful training and test results are obtained by utilizing 2-Trimf and 3-Trimf in F4. 3-Trimf is also effective in F5. The training and test error values obtained are 0.00493021 and 0.00264173 respectively. As in F3, in F6, Trimf is effective in the training process, while Gaussmf is better in the testing process. In F7, the best training error value is found using 3-Trimf. The best test error value is obtained with 2-Gaussmf. The best test error value is found as 0.00632635 with 2-Gaussmf in F8. The most unsuccessful test error value belongs to 3-Trimf. On the other hand, the best training error value is obtained by using 3-Trimf. The best test results are obtained with 2-Gbellmf, 2-Gaussmf and 3-Gaussmf in F9. The worst test result is found with Trimf, while the best training result belongs to 3-Trimf. In F10, the best training and test errors belong to 3-Trimf and 2-Gbellmf, respectively. In F11, more effective test results are found using Gbellmf and Gaussmf according to Trimf. The best training error value is obtained utilizing 3-Trimf. In general, all membership functions are effective in F12. The best training error and the worst test error values belong to 3-Trimf in F13. More successful test results are achieved with Gbellmf and Gaussmf. Effective results are achieved with 3-Trimf both in testing and training in F14. The best test error value in F15 is found as 0.0053328 with 2-Gaussmf. In the results of the training, the success of 3-Trimf is observed again. In F16, the best training and the worst test result are found with 3-Trimf. Likewise, the worst training and best test results are obtained with 2-Gaussmf. A similar situation is observed in F17 and F18. Successful test results are obtained with Gaussmf and Gbellmf in F19. Trimf is more effective in training results. Although a very effective training error value is found with 3-Trimf, it failed in the testing process. Successful results are obtained with 3-Gbellmf and 2-Gaussmf in the test process in F20.

The analysis of the results for the monthly forecast is as follows: The best training error value in F1 is obtained with 3-Trimf. The best test error value is found by using 3-Gaussmf. The best training and test error values are found as 0.00554211 and 0.00930976 with 3-Trimf in F2. Effective results could not be achieved with other MFs. As in F2, in F3 and F4, the most successful training and test errors are found by utilizing 3-Trimf. In F5, while Trimf is better in the training process, Gaussmf is more successful in the testing process. It has been observed that MFs other than 3-Trimf fail in F6. The same is also true for F7. In the testing process of F8, Gbellmf is much more successful. In the training process, 3-Trimf is more effective as in other examples. Training errors in F9 are close to each other. Test error values are also similar except Trimf. Very bad test error values are obtained with Trimf. By contrast, the best training and testing errors in F10 belong to 3-Trimf. The best training error is found as 0.00909059 by using 3-Trimf in F11. In general, the test error value is good for all MFs. The best test result is achieved with 3-Gaussmf. While the best training error value in F12 is found using 3-Gbellmf, the best test error value is obtained with 2-Trimf. In F13, effective test results are found with 2-Trimf and 2-Gaussmf. The best training error value is obtained with 3-Trimf. In F14 and F15, the best training and test errors are found with 3-Trimf. In F16, Gbellmf is effective in the testing process. 3-Trimf is also effective in the training process. While 2-Gaussmf and 3-Gaussmf are effective in the testing process in F17, 3-Trimf is more successful in the training process. In F18 and F19, the best training and test errors are found with 3-Trimf. In F20, 3-Gbellmf is more successful in the test process. In the training process, 3-Trimf is more effective.

According to the training results, the best results obtained for all examples are combined and presented in Table 6. In terms of training results, 3-Trimf is the most effective MF in the daily, weekly and monthly estimation of the number of COVID-19 cases. In the daily estimation of the number of COVID-19 cases, low standard deviation values are obtained in both training and test results. As seen from the training results, the best standard deviation values are mostly obtained with 2-Gaussmf. More effective standard deviation values are achieved with Gaussmf in 12 of 20 examples. According to the test results, it is seen that the most effective test standard deviation values are obtained by using Gbellmf and Gaussmf MFs. When the standard deviation values are examined, it is seen that the MFs exhibit different behaviors on the examples in the weekly estimation. In the training process, 3-Trimf, 2-Gaussmf and 2-Gbellmf are effective on five examples each. 3-Gbellmf is effective on three examples. 3-Gaussmf is effective on two examples. It is seen that the best standard deviations are obtained with Gbellmf and Gaussmf in the test process. Effective standard deviation is not achieved with Trimf in any of the examples. Considering the monthly forecast results, it is seen that the standard deviation values found are generally very low compared to the error value. In fact, this indicates that the error values found are robust. The best standard deviation values on seven examples are found with 3-Trimf. 2-Trimf is also effective on four examples. In other words, the best training standard deviation values are obtained with Trimf in 11 of the 20 examples. This rate is the lowest in Gbellmf. In terms of the testing process, the best standard deviation values are found with Gaussmf in 11 of the 20 examples. Here, Trimf appears to be the most unsuccessful.

Table 6 Information belonging to the best results obtained by using FPA

The graphical relationship between real output and predicted output is important in forecasting and modeling. It is expected to overlap with each other. Especially the low error value ensures the formation of an effective graph. The graph of the real output and the predicted output belonging to all examples is compared for daily estimation in Fig. 5. When the graphs of 20 examples are evaluated, analyzes are divided into 2 groups. In the first group, the real output and the predicted output are highly similar to each other. Graphics other than F3, F16 and F20 belong to this group. In the second group, there are differences between some output values as in F3, F16 and F20.

Fig. 5
figure 5

Comparison of the real and predicted output graphs in the daily forecasting of the number of COVID-19 cases for all problems

In solving the related problem, the performance of FPA is compared with algorithms such as PSO, BA, HS and DE. Comparison results of the training process are given in Table 7. The comparison of test results is presented in Table 8. When the training error values are examined, it is seen that FPA is more effective on all examples in daily estimation. In addition, it is observed that the results found with PSO, DE and FPA on F12 are close to each other and are not statistically significant. DE is more effective in test results and the best test error value is found by using DE in 11 of 20 examples. On the other hand, FPA achieves the best test result on four examples. The related heuristic algorithms achieve different success ranking on examples. In weekly estimation, the best training error value is obtained with FPA on all examples. In the testing process, the most effective algorithm is DE. It is effective in 12 of 20 examples. As with the daily and weekly forecast, the performance of the FPA in the monthly forecast is compared with PSO, DE, HS and BA. FPA is more effective in terms of training results. In the test results, the two most effective algorithms are FPA and PSO.

Table 7 Comparison of training results of algorithms for F1 and F20
Table 8 Comparison of test results of algorithms for F1 and F20

In order to better evaluate the performance of the algorithms on all examples, a success ranking for daily estimation is created in Table 9. The success rankings of the results that are not statistically significant are accepted as the same. According to the training results, the success ranking of the algorithms is as follows: FPA, PSO, DE, BA and HS. In the test results, the best ranking belongs to DE. FPA is also in the third place. When the training and test results are evaluated together, it is seen that the best success ranking is in FPA. In other words, it is concluded that FPA is better than other algorithms in daily estimation of the number of cases. According to both training and test results belonging to weekly estimation, the success ranking of the algorithms is created by considering the performances on all examples. It is presented in Table 10. The training success ranking obtained by using training error values is FPA, PSO, DE, BA and HS, respectively. According to the test results, the best success ranking belongs to DE. FPA and PSO are close to each other. When the training and test results are evaluated together, the best success ranking belongs to FPA. Next, DE and PSO are located. The rankings of both are very close to each other. BA and HS have the lowest rankings. The success ranking of the five algorithms in monthly forecasting is analyzed in Table 11. The success ranking of training is as: FPA, PSO, DE, BA and HS. The best test ranking belongs to PSO. According to the test results, the most effective algorithm after PSO is FPA. When the training and test results are evaluated together, it is seen that FPA and PSO are the most effective algorithms.

Table 9 Comparison of ranks of success of algorithms for F1 and F20
Table 10 Comparison of ranks of success of algorithms for F1 and F20
Table 11 Comparison of ranks of success of algorithms for F1 and F20

4 Discussion

Within the scope of this study, neuro-fuzzy training is carried out for daily, weekly and monthly estimation of COVID-19 cases. The system to be modeled in neuro-fuzzy training directly affects the performance. Considering the number of COVID-19 cases, each country has a different graph. In other words, the case status of each country corresponds to an independent nonlinear system. In order to effectively estimate the number of COVID-19 cases, it is not sufficient to examine the situation of a country alone. Therefore, case situations of twenty countries are also examined.

Estimation of the number of COVID-19 cases is realized as daily, weekly and monthly. The problem is transformed into a dynamic system using time series data. Performances on different systems consisting of two and three inputs are examined. The applications are carried out on the systems that give the best results. The testing process of the systems is carried out on only one country. The best systems obtained are applied for all examples. The process of identifying the best systems has a limitation. The applied limitations, on the other hand, affect the result. Interpretation of the results is carried out within limitations.

When the daily, weekly and monthly results are evaluated together, it is seen that the best results are obtained in the daily forecast. Error values in the monthly forecast are more unsuccessful than the daily and weekly forecasts. In particular, the daily and weekly forecast is realized in the short term. The input and output data are likely to be related to each other. The monthly forecast is realized in the medium term. The relationship between input and output is limited. In particular, the systems used in daily, weekly and monthly forecasts affect the results. In order to achieve better results, different combinations of inputs can be tried. However, it should be considered that it will take a long time to try the different input combinations. As seen in Table 6, the best training results in the daily forecast are in the range of 0.000398027 and 0.0175404. The best training results in the weekly forecast are between 0.00121783 and 0.011916. In the monthly forecast, this range widens. The best training results in the monthly forecast are in the range of 0.00377697 and 0.0286562. When all the results are evaluated together, it is observed that the best training results are between 0.000398027 and 0.0286562. Table 6 also shows the test results corresponding to the training results. The best test errors obtained for the daily, weekly, and monthly forecast are 0.0005607, 0.00159993 and 0.00362886, respectively. The worst test results are 0.0256878, 0.0165352 and 0.409867, respectively.

One of the factors affecting performance in neuro-fuzzy training is MF type and number. Therefore, results are obtained on 3 different MF types. These are gbellmf, trimf and gaussmf. In addition, the number of MFs used is 2 and 3. In the daily, weekly and monthly estimation, the increase in the number of MFs improves the training error value generally. However, a definite judgment could not be reached for the test error value. It has been observed that different behaviors are exhibited according to the dynamic structure of the examples used.

The performance of meta-heuristic algorithms such as FPA, PSO, BA, HS and DE is compared in daily, monthly and weekly forecasting. Looking at the training results in all estimation types, it is observed that FPA is more effective. In test error values, DE is more effective. When all results are evaluated together, it is observed that FPA is more effective in solving the related problem. After FPA, the most successful algorithms are PSO and DE, respectively.

The study can be expanded to achieve more effective results in solving the related problem. Systems with different input combinations can be tried. Neuro-fuzzy structures can be changed. Different types of MFs can be used. By increasing the number of MFs more, its effect on performance can be evaluated. In this study, the situations belonging to twenty countries are analyzed. The number of countries to be examined can be increased. It should be consisted that long times are needed to carry out the studies mentioned here.

Although a comprehensive study is conducted to estimate the number of COVID-19 cases in this study, there are some limitations. All results are evaluated within these limitations. These limitations are control parameter selection, system selection, selection of data, selection of MFs and training algorithms. Population size and maximum number of generations are used as 20 and 2500, respectively. The switch probability is 0.8. It is possible to obtain more effective results for higher maximum number of generations. In this case, as this value increases, the time cost will increase. A similar situation applies to population size and switch probability. In fact, this study tries to solve 20 dynamic problems. The control parameters that lead to success for each problem may be different. However, the same control parameter values are used for all problems. Namely, time cost is also taken into account. Therefore, a limitation has been applied. In fact, a time series analysis is performed for 20 countries. Nonlinear models consisting of two and three inputs are created to solve the related problems. The effect of different models on performance could also be evaluated. A limitation has also been applied in system selection and model creation. The data used in the training and testing process directly affect the performance. Daily data between 1 April 2020 and 31 December 2020 are used for all problems. Approximately 80% of the dataset is used for the training process. The rest are included in the testing process. Gbellmf, trimf and gaussmf as MFs are used in this study. MFs other than these are not taken into account. A limitation has been applied on MFs. If these limitations are expanded, it is possible to obtain more effective results. Expanding these limitations will be taken into account in the modeling of similar or different systems in future studies.

5 Conclusions

Neuro-fuzzy approaches are used to model many problems in the real world. In particular, the analysis of the time series is also within this scope. Neuro-fuzzy training is performed using FPA for the short and medium-term estimation of the number of COVID-19 cases belonging to twenty countries including USA, India, Brazil, Russian, France, UK, Italy, Spain, Argentina, Germany, Colombia, Mexico, Poland, Turkey, Iran, Peru, Ukraine, South Africa, the Netherlands and Indonesia in this study. The training process is important to achieve successful results with neuro-fuzzy. Therefore, FPA is used as a training algorithm to achieve effective results. One of the important aspects affecting performance in neuro-fuzzy is the structure of the problem/system. When the structure of each system in the study is examined, it differed. This situation presents the problem structure as an issue that affects the performance of the FPA. The studies have been conducted on different MFs for the estimation of the number of COVID-19 cases. At the same time, different numbers of MFs are taken into account. In solving the related problem, it has been observed that the type and number of MFs affect the performance of the proposed method.

When the training and test results are evaluated, it is observed that effective results are achieved by using FPA. Generally, low standard deviation values are obtained. This shows that the solutions are robust. The performance of FPA is compared with heuristic algorithms such as PSO, BA, HS and DE. It has been observed that FPA is very successful, especially in the training results. When the training and test results are evaluated together, the success ranking of the algorithms is formed as FPA, PSO, DE, BA and HS. In other words, FPA is more effective than other algorithms in solving the related problem.

In this study, time series analysis was performed. In fact, the identification of a nonlinear system has been realized. It seems that the FPA-based ANFIS approach is successful in solving the relevant problem. There are many parameters that affect the result of the relevant hybrid approach. Especially gbellmf and trimf MFs can be used to solve similar problems. Additionally, the number of MFs is also important. Especially in two-input systems, more effective results can be achieved with 3 MFs for each input. After a certain number of iterations, the rate of improvement of solution quality slows down. Therefore, the maximum number of iterations can be taken as 2500 to solve problems of similar structure.

This study will shed light on future studies. In particular, it has been found that the performance of FPA is better than many meta-heuristic algorithms. Neuro-fuzzy is used in many fields. Therefore, in the continuation of this study, ANFIS training will be carried out using FPA to solve many problems in fields such as medicine, economy, tourism technologies, education, engineering and energy. At the same time, it is considered important to develop new variants of FPA in order to increase its global and local convergence ability in ANFIS training. Research in this direction will also be carried out.