1 Introduction

The pandemic Corona-Virus Disease 19 (COVID-19) is one of the major problems faced by the world today. COVID-19 is a harmful infectious disease that spreads from human to human affecting the human lungs and causing Severe Acute Respiratory Syndrome (SARS) and sometimes leads to death [1]. COVID-19 pandemic initially started from Wuhan, Hubei province in China in December 2019. The deadly disease COVID-19 has been named after the disease Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2), which emerged in 2002 [2]. Later knowing the severity of the COVID-19 disease, the World Health Organization (WHO) declared the widespread of COVID-19 as an emergency pandemic throughout the world [3]. As of June 4, 2020, there have been 62,87,771 confirmed cases, with 3,79,941 mortality cases reported globally. Many nations have declared it a national emergency to avoid the spread of COVID-19 and prescribed lockdown for containment of COVID-19 [4]. Several researchers have identified that COVID-19 mortality is caused due to cytokine storms [5]. As of today, there is no exact medicine for COVID-19. The medicine found for a similar virus has been utilized as a treatment against COVID-19 based on clinical trials [6]. Hence, there is no medicine or particular treatment for curing COVID-19, prevention is the only possible cure, and the prevention is more effective by predicting the spread of COVID-19 [7, 8].

Several kinds of research have been conducted to study the spread of COVID-19 using an Artificial Intelligence (AI) technique. In which, the study uses past data, and the region is mathematically analyzed to predict the future spread of COVID-19. In [9], Machine Learning (ML) technique has been developed to handle past data and predict the spread of COVID-19. In [10], cloud computing and AI-based methodology have been developed to process the health care system. AI-based Computed Tomography (CT) scan for predicting COVID-19 has been developed to monitor the conditions of COVID-19 patients [11]. Alibaba has developed AI-based methodology to predict the COVID-19 spread over China; the analysis shows 98% accuracy in real-time testing in China [12]. An AI-based system has been developed to identify the appropriate vaccines for patients [13]. The developed system also accelerates the quick heal based on genome sequences. Machine learning and cloud-based techniques have been developed to predict the growth of COVID-19 pandemic [14]. In [15], developed an AI tool to detect COVID-19 patients using the thermal sensor of the mobile phone. AI-based early detection of high-risk COVID-19 patients has been developed [16]. The developed tool uses an AI tool complained of scan images of the patients to identify the risk factor. An improved Adaptive Neuro-Fuzzy Inference System tool has been proposed to accelerate the prediction based on the different regions [17]. A regression model has been developed to estimate the growth of COVID-19 infection based on the rate of growth of cases outside China [18]. Rohit Salgotra et al.[19] proposed a prediction model using genetic programming (GP) and the prescribed model developed confirmed cases (CC) and death cases (DC) among three states such as Maharashtra, Gujarat, and Delhi with entire India. Grinberga-Zalite et al. [20] discuss the flexibility to meet out the food requirements during and after COVID-19 crisis. Intissar et al. [21] propose a mathematical assessment for the COVID-19 using SEIR model. Rasheed et al. [22] proposed a mathematical approach in determination of temperature variation between two factors which is needful for COVID-19 pandemic. Agarwal et al. [23] proposed in-silica analyses and reverse vaccinology technique for the development of COVID-19 vaccination.

The improvement in an expert system made the prediction accurate based on the past data. The expert system comprises fuzzy logic and artificial neural network systems. Adaptive Neuro-fuzzy Inference System (ANFIS) is the combination of fuzzy logic and artificial neural network. ANFIS has a higher application with accurate prediction [20]. Chronic kidney disease (CKD) diagnosis and prediction in early-stage using ANFIS have been developed [21]. The method uses a Takagi–Sugeno type ANFIS model to predict the Glomerular Filtration Rate (GFR) values as the biological marker of renal failure. ANFIS-based heart disease classification and prediction of suitable medicine have been developed [22]. The developed model has proved 92.30% forecast in the patient's heart disease degree. A Healthcare monitoring system to classify Cardiovascular and respiratory diseases using ANFIS has been developed [23]. Hence, the rule formation is simple and has higher accuracy; ANFIS can be used for predicting a profound epidemic disaster. Kumar et al. [24] discuss the machine learning algorithm for COVID-19 estimation for lung infected patients. Jeon et al. [25] developed an LQR controller based on fuzzy logic for wind turbines. In this study, a fuzzy-based system has been used to control the performance of the wind turbine. Riahi-Madvar et al. [26] have proposed an improved technique for predicting pollutant dispersion coefficient in rivers. Nabipour et al. [27] have developed ANFIS model to estimate climate change on wind power generation system. Baghban et al. [28] have developed ANFIS-based Swarm Concept Model for Estimating Relative Viscosity of Nanofluids. Soft computing techniques are getting popular for their widespread applications in various filed [29, 30].

In this paper, a profound analysis is carried out in India to predict the possible COVID-19 outbreak using Adaptive Neuro-fuzzy Inference System (ANFIS)-based machine learning technique. Generally, Machine learning models are deployed for feature prediction that involves risk and also for epidemic analysis [24]. The country India has been chosen in this analysis as the COVID-19 cases get rapidly increases across the states of India and have a higher population rate. Predicting the spread of COVID-19 at the right time could help the government to prevent the spread of COVID-19 and would save thousands of souls. The proposed ANFIS-based prediction system tracks the growth of epidemic based on the previous data sets fetched from cloud computing. The proposed technique not only predicts the outbreak but also tracks the disease and suggests a measurable policy to manage the COVID-19 epidemic. The obtained prediction shows that the proposed technique very effectively tracks the growth of the COVID-19 epidemic. The ANFIS is chosen for this study as it has both numerical and linguistic knowledge, and also has ability to classify data and identify patterns. The proposed technique not only predicts the outbreak but also tracks the disease and suggests a measurable policy to manage the COVID-19 epidemic. The obtained prediction shows that the proposed technique very effectively tracks the growth of the COVID-19 epidemic. The result shows the growth of infection rate decreases at the end of 2020 and also has delay epidemic peak by 40–60 days. The prediction result using the proposed ANFIS technique shows a low Mean Square Error (MSE) of 1.184 × 10–3 with an accuracy of 86%. The study provides important information for public health providers and the government to control the COVID-19 epidemic. The paper is organized as follows, Materials and methods with data preprocessing have been discussed in Sect. 2, Proposed ANFIS prediction technique and the developed ANFIS architecture is given in Sect. 3, Sect. 4 discusses the result, and Sect. 5 concludes the proposed research.

2 Materials and methods

In this study, the data set has been created by combining the data collected for COVID-19 for India through cloud computing and local data collected based on population, active cases, lockdown status, and previous medical records. Meanwhile, from the dataset, the data are being separated as a training dataset and testing dataset. Further, the training data has been classified as error data, change in error data, and predictable data. The classified dataset is given as input to the ANFIS-based AI technique. The block diagram of the developed prediction using ANFIS technique is shown in Fig. 1. ANFIS has been selected in this study because the complexity of decision-making is less with simple if-then rules and has high accuracy in prediction [17, 31, 32]. In this study, the Takagi–Sugeno model has been developed to predict the spread of COVID-19 for India. India has been chosen because India is the second-largest populated country, and recent research indicates that COVID-19 spreads rapidly across India. Through the analysis, a suitable solution can be formed and can prevent the spread of COVID-19 [33, 34].

Fig. 1
figure 1

The architecture of the proposed COVID-19 prediction using ANFIS

2.1 Data collection and processing

The data collected for the assessment has been listed in Tables 1 and 2

Table 1 COVID-19 dataset for India
Table 2 Local dataset for India

The COVID-19 data sets for India, fetched from the cloud, are listed in Table 1 from the date of the pandemic. As of June 5, 2020, 2,36,621 cases with 6,621 deaths have been reported in India for COVID-19. Furthermore, for the assessment, a separate dataset has been identified based on total population, population density, age factor, CVD and diabetes patients, smokers, transport usage, and health care facilities as local data. The details of the local data set have been listed in Table 2, collected from the local corporation, and the Ministry of Health and Family Welfare, Government of India. The data sets are combined based on time, and a new dataset is created for assessment.

The new dataset is given as input to the ANFIS AI technique. The process for the prediction is shown in Fig. 2. The input dataset has been modified based on time, and the data has been split into training data and testing data. Among that train, data is initialized for clustering, and the parameter setting has been done. In the parameters set, the iteration count, limits, population, and the objective function are fed. The ANFIS completed its training when it reached its maximum iteration or when it reaches the objective function [35,36,37]. The training dataset has been used for performance evaluation with the test dataset. The new predicted dataset has been finally obtained as the output from the ANFIS system.

Fig. 2
figure 2

Flow chart of the proposed ANFIS

3 Developed anfis technique to predict COVID-19

The ANFIS controller has been trained using back-propagation methodology through the least-square estimation method. Figure 3 depicts the architecture of the developed ANFIS, which consists of two inputs and one output. The developed ANFIS model is to make rapid decisions and to predict the spread of COVID-19 cases in India. The developed ANFIS has two inputs; they are COVID-19 data and local data. The spread estimation is the output. In the developed prediction model, the ANFIS first-order Sugeno model as well with fuzzy IF-THEN rules of Takagi and Sugeno type has been used [17, 38, 39]. If x is A and y is C then,

$$ f_{1} = p_{1} x + q_{1} y + r_{1} $$
(1)
Fig. 3
figure 3

Structure of the ANFIS controller

3.1 Training the ANFIS controller

The ANFIS model consists of five layers, as shown in Fig. 3. The architecture of the developed ANFIS system is shown in Fig. 4. The layers of the training functions are described as follows,

Fig. 4
figure 4

Architecture of developed ANFIS controller

3.1.1 First layer

This layer consists of two input nodes, input 1 and input 2 as variables (MFs). This layer transforms the input values x & y to the next layer, and every node in this layer is considered as an adaptive node where e1 and e2 are the error function fed to node i to separate linguistic variable Ai (i.e., A1, A2, A3, A4, A5, A6, A7, A8, and A9) and Bi (i.e., B1, B2, B3, B4, B5, B6, B7, B8, and B9) as the input. The input is linked with this node function, and Oi is the output layer of layer 1. Here nine trapezoidal Membership Functions (MF) with maximum = 1 and minimum = 0 has been used, and the mathematical function is given as,

$$ O_{i}^{1} = \mu A_{i} (e_{i} ) $$
(2)

where i = 1, 2…9.

3.1.2 Second layer

In this layer, the input variable received from layer 1 undergoes weight updation for the membership function and acts as fuzzy sets. The nodes of the second layer are non-adaptive [40.41]. The function of this layer is to multiply the layer 1 signals and to give the output product. The mathematical expression is given as,

$$ w_{j} = \mu A_{i} (e_{1} ) \times \mu B_{i} (e_{2} ) $$
(3)

where i = 1, 2…9 and j = 1, 2…81. The output of this layer signifies the rule strength.

3.1.3 Third layer

In this layer, the neurons in each node undergo identical conditioning using the fuzzy rules. The computation is carried out relating the layers in the node with the fuzzy rules set. Weights are being calculated for every node in this layer, and this layer is non-adaptive. Each node calculates the weight based on the rules to strengthen. It is based on the weights in node to the ratio of weights of the rules. The mathematical function is given as,

$$ w_{j}^{*} = \frac{{w_{j} }}{{w_{1} + w_{2} ...w_{81} }} $$
(4)

where j = 1, 2… 81. The outputs of this layer are normalized firing strengths.

3.1.4 Fourth layer

This layer is a defuzzification layer; and provides the output values that undergone fuzzy rules. The nodes of this layer are adaptive, and mathematical function is given as,

$$ O_{j}^{4} = w_{j}^{*} f_{j} = w_{j}^{*} (p_{j} e_{1} + q_{j} e_{2} + r_{j} ) $$
(5)

The rule base is given as,

If e1 is A1 and e2 is B1 then f1 = p1e1 + q1e2 + r1.

If e1 is A2 and e2 is B2 then f2 = p1e1 + q2e2 + r2.

.

.

.

If e1 is A9 and e2 is B1 then f81 = p81e1 + q81e2 + r81.

where O4j is the layer-4 output, pj, qj, r are the parameter set in layer-4, Ai and Bi are the fuzzy membership function.

3.1.5 Fifth layer

The fifth layer is the output layer in the ANFIS system. The function of the fifth layer is, to sum up, all the inputs processed by layer-4. This layer also transforms fuzzy results into binary form. The node in this layer is non-adaptive, and the single node computes overall incoming signal to form a summation output. The mathematical function is given as,

$$ y = \sum\limits_{j = 1}^{81} {w_{j}^{*} f_{j} } = \sum\limits_{j = 1}^{81} {((w_{j}^{*} e_{1} )p_{j} + (w_{j}^{*} e_{2} )q_{j} + (w_{j}^{*} )r_{j} )} $$
(6)

The above training indicates that e1 and e2 have a significant impact on output prediction. A hybrid fuzzy and neural network-based intelligent technique has been applied to develop ANFIS architecture. The ANFIS analysis the parameter, in feed-forward propagation the function signals moves forward till layer-4, and appropriate parameters are estimated using the least-square technique. In back-propagation, the error rate propagates backward, and the weight of the layers is updated using the gradient descent algorithm. In the developed model, the ANFIS consists of 81 rules with 9 membership functions to the input variable. Moreover, the training data used for training is 600, and testing data used are 600. The surface view obtained for the developed ANFIS technique is shown in Fig. 5. The Figure shows the 3-D view, which displays the variation of the output for the corresponding input. The developed ANFIS estimates the COVID-19 across India.

Fig. 5
figure 5

Surface diagram of the ANFIS prediction controller

4 Results and discussion

An analysis has been carried out to predict the Spread of COVID-19 using ANFIS tool in MATLAB and Google AI. In the analysis, to prove the performance of the proposed ANFIS-based methodology, the proposed technique has been compared with the Multiple Linear Regression (MLR)-based prediction technique. Figure 6 shows the COVID-19 cases in India. From the Figure, it can be seen that the cases increase linearly. Figure 7 shows the COVID-19 mortality cases in India. The mortality cases are increasing day-to-day. The lockdown was implemented on March 22, 2020, and later restrictions in the lockdown were removed due to economic impact on May 3, 2020. From Figs. 6 and 7, it can be observed that the COVID cases get increase later with the liberation given in lockdown.

Fig. 6
figure 6

COVID-19 cases as of June 3, 2020

Fig. 7
figure 7

COVID-19 deaths reported in India

Initially, the Linear Regression (LR) algorithm has been implemented to analyze the prediction rate. Figure 8 shows the predicted COVID-19 cases until Aug 30, 2020, obtained using the LR technique. Figure 9 shows the predicted COVID-19 mortality cases. Further, the MLR prediction algorithm has been implemented to analyze the prediction rate. Figure 10 shows the predicted COVID-19 cases until Aug 30, 2020, obtained using MLR technique. From the Figure, it can be seen that the COVID-19 cases could increase by 13% when compared to the present cases. From the analysis, it also can be predicted that most cases are in the region where the population density is high and liberation is given in lockdown. Figure 11 shows the predicted COVID-19 mortality cases. The analysis predicts that the mortality rate would be less when compared to COVID-19 infected cases.

Fig. 8
figure 8

COVID-19 cases predicted using LR technique

Fig. 9
figure 9

COVID-19 mortality cases predicted using LR technique

Fig. 10
figure 10

COVID-19 cases predicted using MLR technique

Fig. 11
figure 11

COVID-19 mortality cases predicted using MLR technique

Furthermore, the new dataset formed with the combined data of COVID-19 and local data has been processed by the ANFIS. In this analysis, other factors such as smoking ratio, lung disease, and pollution data have been included. The obtained prediction is shown the Fig. 12. From the Figure, it can be understood that the COVID-19 cases could increase by 16,00,000 if the present scenario continues. The prediction clearly shows that the cases increase linearly, and the Govt. policy must be changed to prevent the spread of COVID-1.

Fig. 12
figure 12

COVID-19 cases predicted using ANFIS technique

A comparative analysis has been carried out to evaluate the performance and accuracy of the proposed AI technique. The obtained results have been listed in Table 3 in which all techniques have been trained till maximum iteration reaches. From the analysis, it is seen that the proposed prediction technique takes the lower computation time of 438 s. Further, it uses a rule-based technique, which reduces the complexity when compared to LR and MLR techniques. The P-SVM used in genomic sequence analysis [24] obtained a prediction accuracy of 84% and is also purely rule-based. The prediction accuracy obtained through the proposed ANFIS technique is 86%. Therefore, from the analysis, it is evident that ANFIS-based prediction technique has higher accuracy with minimum computation.

Table 3 Comparative analysis

5 Conclusion

An ANFIS-based AI prediction technique has been proposed to predict the spread of COVID-19 in India. In this study, The proposed ANFIS-based prediction system tracks the growth of epidemic based on the previous data sets fetched from cloud computing. The proposed technique not only predicts the outbreak but also tracks the disease and suggests a measurable policy to manage the COVID-19 epidemic. In this analysis, the following observation has been made. The result obtained shows that the spread of COVID-19 continues if the liberation were given to the lockdown. The government of India must reconsider strict lockdown to prevent the spread. The analysis depicts that the COVID-19 cases could reach 16,00,000 at the mid of August. The result shows the growth of infection rate decreases at the end of 2020 and also has delay epidemic peak by 40–60 days. The prediction result using the proposed ANFIS technique shows a low Mean Square Error (MSE) of 1.184 × 10–3 with an accuracy of 86%. The study provides important information for public health providers and the government to control the COVID-19 epidemic.