# Co-Operative Binary Bat Optimizer with Rough Set Reducts for Text Feature Selection
## 3 The Proposed Algorithm
### Initialization Stage  
This stage contains three steps, i.e., (i) BBA\({}_{\text{CO}}\) parameter initialization that is based on the parameter tuning of the Taguchi method, (ii) sub-population initialization using a modified LHS method and (iii) solutions' evaluation to choose the best candidate solution in each sub-population based on the dependency measurement using rough set theory (RST) [65]. Algorithm 1 shows the pseudocode for the initialization stage. ```
Initialization //Step 1: BBA\({}_{\text{CO}}\) parameter initialization Initialize SubPop-no, SubPop-size, Evaluate-fullSol-rate //Step 2: Sub-population initialization  Size-PartialSolution = F/SubPop-no, where F total represents number of features Remained = F\(\%\)SubPop-no For each Sub-Population (i), where i represent the index from 0 to SubPop-no If i \(<=\) Reminder  Size-PartialSolution(i) = Size-PartialSolution + 1 Else  Size-PartialSolution(i) = Size-PartialSolution For 1 to SubPop-size  Generate initial solution using modified LHS method  Initialize loudness (A), pulse rate (r), minimum frequency (\(F_{\text{min}}\)), velocity (v),  maximum frequency (\(F_{\text{max}}\)); //Step 3: Solution evaluation  Evaluate each solution in each sub-population using rough-set based objective function Assign the best solution into \(x_{best}^{i}\) Combine all \(x_{best}^{i}\) into \(x_{best}\) Save \(x_{best}\) in memory
```  
**Algorithm 1** Pseudocode of the initialization stage. In Step 1, _SubPop-no_ refers to the number of sub-populations, _SubPop-size_ refers to the number of candidate solutions in each sub-population, and _Evaluate-fullSol-rate_ refers to the number of generations reproduced before evaluating the full dimension solutions (referred to as _FullSolution_), are initialized. In this work, a Taguchi method [66] was used to identify the best values of the parameters for the BBA\({}_{\text{CO}}\) algorithm. Three levels were considered for each factor as shown in Table 1. The BBA\({}_{\text{CO}}\) algorithm runs three times for each factor at each level, and the average Signal-to-Noise (SN) ratio plot for each level of the factors is shown in Figure 2. The level with the maximum SN ratio is the optimum parameter determined by the Taguchi method. According to Figure 2, the optimum value for _SubPop-size_ is set to 100, the _Evaluate-fullSol-rate_ is set to 10, and the _SubPop-no_ is set to 15 as shown in Table 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Definition** & & **Level** \\ \hline  & **1** & **2** & **3** \\ \hline _SubPop-size_ & The sub-population size & 50 & 100 & 150 \\ _SubPop-no_ & The number of sub-populations & 10 & 15 & 20 \\  & The number of reproduced generations before  Evaluate-fullSol-rate &  evaluating the full dimension solutions (referred to & 10 & 20 & 30 \\  & & & & \\ \end{tabular}
\end{table} 
Table 1: The BBA\({}_{\text{CO}}\) algorithm parameter levels for the Taguchi method. In Step 2, the candidate solutions of each sub-population are initialized using a modified LHS method. Note that the candidate solution in each sub-population that contains subset of features is referred to as _PartialSolution_, while _FullSolution_ refers to a candidate solution with a full dimension where its length is equal to the total number of features. The size of _PartialSolution_ (_Size-PartialSolution_) is determined based on the number of features and the number of sub-populations as in the following equations:  
\[\textit{Size-PartialSolution}=\textit{F/SubPop-no}\]  
\[\textit{Remainder}=\textit{F }\%\textit{SubPop-no}\]  
where \(F\) is the total number of features, and _Remainder_ is the number of sub-populations that will be assigned extra one feature. For example, if \(F\) is 20, and _SubPop-no_ is 3, thus the _Size-PartialSolution_ and _Remainder_ are:  
\[\textit{Size-PartialSolution}=\textit{20/3}=\textit{6}\]  
\[\textit{Remainder}=\textit{20\%3}=\textit{2}\]  
Based on the value of the _Remainder_, the size of two out of three sub-populations will contain one extra feature.