## 5 Proposed Feature Selection Method (A2 BCF)
* **Employed bee phase:** Each bit vector is taken by an employed bee, where it regulates the food sources (bit vector) by flipping only one of the bit values in the vector. If the neighboring (new) vector has a better fitness, it gets replaced with the previous vector, and its corresponding accuracy gets stored. In other words, the employed bee evaluates the model's accuracy by including (bit 1) or excluding (bit 0) only one of the features and passing the required information to onlookers. * **Onlooker bee phase:** The information about the quality of the food sources is shared with the onlookers, and they then select the food sources with a better probability of exploration (based on Equation (7)). Then, selected food sources go under the same process as step 3 to become exploited. After all the onlookers are done with their parts, the food source with the best quality is memorized. \[P_{i}=\frac{Fit_{i}-min(Fit)}{max(Fit)-min(Fit)}\] (7)
* **Scout bee phase:** This phase has an additional step in A2 BCF. In original ABC, a scout bee (assigned to the deserted food source, if any) generates a random novel food source of size \(N\). While onlooker/employed bees change only one bit of the bit vector, scout bees change all the bits in the vector. As we mentioned earlier, scout bees have a low mean in the food source quality that they find. Therefore, we added another step in which Opposition-Based Learning (OBL) is submitted to the abandoned food source to generate an opposite food source location based on Equation (8). Then, the algorithm moves forward with better food sources from random and OBL methods. The generated bit vector is then submitted to the ML classifier and its accuracy is stored. \[\tilde{x}_{i,j}=1-x_{i,j}\] (8)
* **Termination process:** The employed, onlooker, and scout bee phases will continue until the algorithm reaches the defined maximum number of evaluations/runs. In this study we set the maximum number of evaluations to 5000. ```
**Input:** Dataset, \(K=100\), Population size (PS)  
**Output:**\(Population\) (Cluster centroid/representative)
```
1:Randomly generate a population of size PS, with food sources of size length(\(Features\_set\))
2:# Clustering the random population to k clusters
3:Compute the proximity matrix (cosine similarity matrix)
4:Let each vector be a cluster
5:while The remaining clusters are more than PS/k do
6:Merge the two closest clusters
7:Update the matrix
8:endwhile
9:Take cluster representatives (one random member of each cluster), where k is defined as the new population
10:return population ```
**Algorithm 2** Agglomerative Clustering Algorithm for Initialization Phase

Algorithm 3 presents the pseudocode of the A2 BCF algorithm explained above. ```
1:Input:\(threshold\) = 50, \(limit\) = 3, \(max_{eval}\) = 5000, \(trial_{i}\) = 0 Output: Optimal features subset
2:Call Algorithm 2 (PS = 2000; 5000; 10,000)
3:Discard the food sources with poor quality(\(<threshold=50\)) from new population
4:while Stopping criteria is not met(number of evaluations \(<max_{eval}\)) do
5:for\(i\) to \(population\_size\)do
6: Employed bee regulates the bit vector and find a new vector \(Ni\) in the neighborhood.