## 3 Methodology
### Feature Selection and Count  
The computation of the fitness and cost functions largely depends on the classification accuracy obtained by using a classifier on a selected fragment of the dataset. In this study, an investigative exploration was carried out to determine the influence of different popular classifiers in solving the feature selection problem. Although the K-nearest-neighbor (KNN) was used as the base classifier, we applied the random forest (RF), multi-layer perceptron (MLP), decision tree (DT), support vector machine (SVM), and Gaussian Naive Bayes (GNB) classifiers as well. On this basis, the number of features selected for arbitrary individual \(ind_{i}\) is computed using Equation (12), where \(D\) and \(1^{ind_{i}^{k}}\) represent the dimension of the feature size in the dataset and the number of feature positions with 1s in individual \(ind_{i}\), respectively.  
\[fc_{i}=\frac{\sum_{k=0}^{D}(1^{ind_{i}^{k}})}{D} \tag{12}\]  
The following listing summarizes and describes the procedures and parametrization used for each of the classifiers investigated in this study:  
1. KNN model: this model solves the classification problem by obtaining K-sets of items sharing some similarity. k-fold values of 5, 3 and 2 were investigated to ascertain the most viable settings. For most of the applied datasets, we found a k-fold of 5 to yield optimal performance, whereas in the case of the Iris and Lung datasets using the BSFO algorithm, we found a k-fold of 2 to be optimal.
2. DT model: similar to the KNN, this study found that k-fold values of 5 and 2 were more suitable for most algorithms and the datasets studied. A significant number of the experiments showed impressive performance using a k-fold of 5. Meanwhile, the maximum depth used for the decision tree model was 2.
3. RF model: the classification task of RF for all of the benchmark datasets that were applied using the proposed algorithm was tested using 300 estimators, while the k-fold used for the cross-validation operation remained at 5.
4. MLP model: the MLP model was tested with the settings of 0.001 for the alpha parameter and with hidden layer sizes of the tuple (1000, 500, 100). The model was trained over 2000 epochs with a random state of 4. Additionally, a k-fold of 5 was used for the cross-validation task.
5. SVM model: the SVM undertakes its classification operation by identifying a decision boundary which is approximate enough to separate items in a dataset into classes. The linear function was applied for the kernel settings, while a C value of 1 and a k-fold value of 5 were investigated with the proposed BEOSA and BIEOSA algorithms.
6. GNB model: The default values for the parameters of the GNB model were applied for the experimentation, although we manually set the k-fold value to 5 for the cross-validation task. These default parameters demonstrated optimal performance in computing the probability value, which may be described as follows: given class label \(Y\) and feature vector \(X\), we can compute the probability of \(X\) when that of \(Y\) is known, as shown in Equation (13).  
\[P(Y|X)=\frac{P(X|Y)P(Y)}{P(X)} \tag{13}\]  
In the next section, we present a detailed discussion of the experimental settings and computational environment with the datasets used to test the method presented in this section.  
Figure 5: Flowchart of the BCBSA algorithm showing the application of the V-functions and S-functions to transform the feature indicators of individuals in the infected sub-population.