# Taylor Bird Swarm Algorithm Based on Deep Belief Network for Heart Disease Diagnosis
## 3 Proposed Taylor-BSA-DBN for Medical Data Classification
### Classification of Medical Data with Proposed Taylor-BSA-Based DBN
#### 3.3.1 Proposed Taylor-BSA Algorithm  
The proposed Taylor-BSA is the combination of the Taylor series and BSA. The Taylor series [31] explains the functions of complex variables, and it is the expansion of a function into an infinite sum of terms. It not only serves as a powerful tool, but also helps in evaluating integrals and infinite sums. Moreover, the Taylor series is aone-step process, and it can deal with higher-order terms. The Taylor series seems to be advantageous for derivations, and can be used to get theoretical error bounds. Above all, the Taylor series ensures the accuracy of classification. Moreover, it is a simple method to solve complex functions. BSA [32] is duly based on the social behaviors of birds that follow some idealistic rules. BSA is more accurate than other standard optimizations with highly efficient, accurate, and robust performances. In addition, there is a perfect balance between exploration and exploitation in BSA. The DBN has recently become a popular approach in machine learning for its promised advantages, such as fast inference and the ability to encode richer and higher order network structures. DBN is used to extract better feature representations, and several related tasks are solved simultaneously by using shared representations. Moreover, it has the advantages of a multi-layer structure, and pre-training with the fine-tuning learning method. The algorithmic steps of the proposed Taylor-BSA are described below:  
Step 1. Initialization: the first step is the initialization of population and other algorithmic parameters, including: \(F_{i,j}\); \((1\leq i\leq j)\), where, the population size is denoted as \(j\), \(h_{\text{max}}\) represent maximal iteration, _prob_ indicate the probability of foraging food, and the frequency of flight behavior of birds is expressed as \(Ft\). Step 2. Determination of objective function: the selection of the best position of the bird is termed as a minimization issue. The minimal value of error defines the optimal solution. Step 3. Position update of the birds: for updating the positions, birds have three phases, which are decided using probability. Whenever the random number \(Rand(0,1)<prob\), then the update is based on foraging behavior, or else the vigilance behavior commences. On the other hand, the swarm splits as scroungers and producers, which is modeled as flight behaviors. Finally, the feasibility of the solutions is verified and the best solution is retrieved. Step 4. Foraging behavior of birds: the individual bird searches for the food based on its own experience, and the behavior of the swarm, which is given below. The standard equation of the foraging behavior of birds [32] is given by,  
\[F_{i,j}^{h+1}=F_{i,j}^{h}-F_{i,j}^{h}Rand(0,1)[Z+T]+Rand(0,1)[P_{i,j}Z+Y_{j}T] \tag{3}\]  
where, \(F_{i,j}^{h+1}\) and \(F_{i,j}^{h}\) denotes the location of \(i^{th}\) bird in \(j^{th}\) dimension at \((h+1)\) and \(h\), \(P_{i,j}\) refers to the previous best position of the \(i^{th}\) bird, \(Rand(0,1)\) is independent uniformly distributed numbers, \(Y_{j}\) indicates the best previous location shared by the birds swarm, \(Z\) denotes the cognitive accelerated coefficients, and \(T\) denotes the social accelerated coefficients. Here, \(Z\) and \(T\) are positive numbers.