## 3 Proposed Method
### Sentiment Classification
#### 3.4.2 Training of GRU Based on Developed TD-Spider Taylor ChOA  
The training process of GRU was performed using developed TD-Spider Taylor ChoA, which was newly introduced by incorporating TDO approach, SMO model, Taylor series and ChoA. Here, ChoA [25], SMO algorithm [26] and Taylor series [27] were incorporated with TDO algorithm to improve the performance in real world applications. Thus, the combination of the above-mentioned algorithms achieved better performance with regard to convergence speed, and effectively solved unconstrained and constrained issues. The algorithmic process of TD-Spider Taylor ChoA is illustrated as follows.  
_(a) Initialization:_ Originally, SMO generates the randomly dispersed population of spider monkey and is expressed by  
\[S(c)=S_{\min}+S_{\max}+E(0,1)\times(S_{\max}-S_{\min}) \tag{16}\]  
where \(S_{min}\) and \(S_{max}\) refer to minimum and maximum bounds and E(0,1) implies distributed random integer.  
_(b) Error Computation:_ Then, the fitness measure is calculated by Mean Square Error (MSE), in which, the fitness with minimal error is considered as best solution. The fitness measure is estimated by  
\[\rho_{e}=\frac{1}{m}\sum_{h=1}^{m}(V_{t}^{*}-V_{t})^{2} \tag{17}\]  
where \(V_{t}^{*}\) implies target output, \(m\) represents overall samples and \(V_{t}\) denotes classified output from GRU.  
_(c) Local Leader Phase:_ All spider monkeys vary their existing position depending on the details of local group member and local leader experience, which are expressed as  
\[S(c+1)=S(c)+E(0,1)*(S_{x}(c)-S(c))+E(-1,1)*(S_{r}(c)-S(c)) \tag{18}\]  
where \(S(c)\) is current location of spider monkey, \(E(0,1)\) implies uniformly allocated random integer that ranges from 0 and 1, \(E(-1,1)\) is consistently distributed random number among \(-1\) and 1 and \(S_{r}(c)\) refers to randomly selected spider monkey location.  
_(d) Global Leader Phase:_ Every updated location of spider monkey exploits practice of local group and global leader members in global leader section, which is illustrated as  
\[S(c+1)=S(c)+E(0,1)*(S_{x}(c)-S(c))+E(-1,1)*(S_{r}(c)-S(c)) \tag{19}\]  
where \(S_{x}(c)\) denotes location of global leader. Moreover, the updated expression of Spider Taylor-ChoA is specified as  
\[S(c+1)=\left[\begin{array}{c}\left[\frac{5S_{proj}(c)[1-f]*f] /[4.S(c-1)-S(c-2))}{5-2f\cdot 1}+S(c)\right]\frac{1-E(0,1)-E(-1,1)}{2-E(0,1)-E(-1,1)} \\ +\frac{E(0,1)S_{x}(c)+E(-1,1)S_{r}(c)}{2-E(0,1)-E(-1,1)}\end{array}\right] \tag{20}\]  
In order to solve the engineering problems, exploration phase of TDO algorithm was combined with Spider Taylor-ChoA. Here, condition 1 from exploration stage of TDO model was considered and is expressed as  
\[S(c+1)=S(c)+v\cdot(P-F\cdot S(c)) \tag{21}\]  
Figure 2: An illustration of Gated Recurrent Unit (GRU).  
```
Input: Population of spider monkey \(S\) Output: Optimum solution Begin  Initialize the population randomly  Evaluate fitness rate based on expression (17)  Select the local and global leader using greedy selection method. While (stopping norm is not fulfilled) do  Formulate new position with local leader using Equation (18)  Produce novel position with global leader through Equation (29)  Re-compute the fitness measure by using Equation (17)  Perform greedy selection scheme and choose the optimum one  Compute the probability of every member  Produce the new location of each group member  Update global and local position of leader  Redirect every member by Equation (30) when local group leader does not update position.  If global leader has not updated the location, then separate the group into small groups. End while Return the best solution End
```  
**Algorithm 1** Pseudo-code of proposed TD-Spider Taylor ChOA.