## 4 Methodology
### Binary Improved Black Hole Optimizer (Bho)
#### 4.6.3 Mitigating Main Issues in BHO Search Algorithm  
**Mitigating Local Optimal Issue:** The Black Hole Optimization (BHO) algorithm, being population-based, is prone to getting stuck in local optima, where all solutions converge, hindering further progress. To mitigate this issue, we employed a local search operator known as inversion mutation [127]. This mutation technique enhances solution diversity. It operates by selecting a subset of genes from the chromosome (solution) and flipping their values, effectively introducing randomness to explore new solution spaces. The BHO algorithm, like other metaheuristic approaches, faces challenges such as premature convergence [128; 129; 130] and getting trapped in local optima [131]. To address these issues and enhance solution diversity, we introduced a common evolutionary operator known as mutation [132]. In binary problems like FS, each bit in the solution vector undergoes flipping, based on a mutation rate (\(MR\)) set to \(\frac{1}{|X_{i}|}\), where \(|X_{i}|\) represents the length of the solution vector, equivalent to the dataset length. During this process, the algorithm iterates over each bit, generating a random number in the range [0,1]. If this random number is less than \(MR\), the bit is flipped from 1 to 0 or vice versa; otherwise, it moves to the next bit. Algorithm 1 outlines the main steps of our MBHO algorithm. **Mitigating Encoding Issue:** Population-based algorithms typically evolve solutions through a series of processes to generate the next generation, consisting of vectors (chromosomes) with continuous genes (values). However, since our encoding criterion involves a binary string of bits, continuous values need to be converted into a binary format. Transfer functions (TFs) offer a reliable approach for this conversion task without altering the algorithm's structure. In our study, we employed four V2-TF functions (\(V_{2}=|tan(x_{i})|\)) [133], as depicted in Figure 3. Each bit, \(x_{j}\), in the solution, \(X\), is handled as follows:  
\[x_{i}= \begin{cases}0,&V_{2}(x_{i})<0.5\\ 1,&V_{2}(x_{i})\geq 0.5\end{cases}  \tag{17}\]  
**Main Description of MBHO:** The proposed approach is detailed in Algorithm 1, which outlines the Modified Binary Black Hole Optimization (MBHO) algorithm designed  
Figure 3: Representation of the \(V_{2}\)-shaped TF. This function is used to convert the continuous version of BHO to the binary one without changing the original structure of the BHO. specifically for addressing the FS task. The algorithm is binarized through the \(V_{2}\) transfer function, whose behavior is depicted in Figure 3. It is initiated by setting parameters such as the dataset path, correlation type, transfer function, maximum iterations, population size, and mutation rate. The algorithm evaluates stars in the population, ranks them, and designates the best-performing star as the black hole. It then iterates through a loop for a specified number of iterations. In each iteration, the new positions for each star are generated and compared to previous positions using the modified fitness function proposed in our work; see Section 4.4. If a new position surpasses the previous one, it gets updated. The algorithm also calculates the event horizon, eliminating stars that cross the black hole and replacing them with randomly generated ones. Some stars undergo mutation with a certain probability, and if a mutation occurs, their positions are adjusted accordingly. This process continues until the maximum number of iterations is reached and the best solution is found, which is represented by the black hole (best feature set), and returned as the algorithm's output.