## 3 Methodology
### Binarization of EOSA (BEOSA)
#### 3.3.3 BEOSA Algorithm and Flowchart  
The representative models for the binary search space and mathematical models described in the previous subsections are formalized using the algorithm and flowchart presented in this subsection. First, we present the algorithmic formalization as seen in Algorithm 1, which indicates that the values for _epoch_ (maximum number of iterations), _psize_ (population size), _state_ (short distance rate) and _lrate_ (long displacement rate) are required for input, while the output of the algorithm is the global best solution, the cost values for each iteration and the feature count obtained for the optimization process. The binarization of the solution space and computation of the fitness values for each solution are listed in Lines 4-5. The current global best solution and the displacement positions for all individuals in the susceptible compartment are computed in Lines 6-7. In Lines 8-34, the iteration for the optimization process is described, given the satisfiability of two conditions: the number of maximum iterations is not reached, and some individuals remain infected. An estimation of the number of individuals to quarantine from the infected is  
Figure 4: Process flow using BEOSA and BIEOSA to search for the best individual in a discrete search space. computed, and a declaration of the separation of quarantined from infected individuals is made, in Lines 9-10. Iteration of the infected individuals is declared in Line 11, and the number of newly infected cases in the susceptible group is shown in Line 12. In Lines 13-28, we iterate the newly infected cases and generate the discriminant value in Line 14. If the evaluation of the condition in Line 15 is true, then it implies that the method will search within a local space; otherwise, it will search in a global space. In each case of exploitation and exploration, we compute the anticipated number of infections. In Lines 17-21, we apply the \(S1\)\(()\) or \(S2\)\(()\) function, depending on the value of \(d\). Additionally, depending on the satisfiability of the condition in Line 18, the feature position in that individual is mutated to either 1 or 0. A similar procedure is repeated for the exploration phase using the \(T1\)\(()\) or \(T2\)\(()\) function, depending on the value of \(d\). Finally, the compartments are updated and the global best solution is determined before executing the next iteration. ```
1.Input: epoch, psize, srate, lrate
2.Output: gbest, costs, count
3.begin
4.Initialize the populations (psize) as \(S\)
5.Binarize the solution space \(S\)
6.Assign first item in population to first infected case (l)
7.Make newly infected case global best
8.whilec < epochand size (l) > 0 do:
9.Compute individuals to be quarantine
10.1=difference of current infected cases (l) from quarantine cases
11.fori in 1 to size(l)do:
12.generate new infected (nl) case from S
13.fori in 1 to size(nl)do:
14.randomly generate a between 110
15.ifdisplacement(nl[i]) > 0.5 do:
16.update size of nl using srate
17.s=use S2(nl[i]) to transform all dimensions ifd is 1, otherwise use S1(nl[i])
18.ifs >= randdo:
19.nll[i] = 1
20.else:
21.nll[i] = 0
22.else:
23.update size of nl using lrate
24.t=use T2(nl[i]) to transform all dimensions ifd is 1, otherwise use T1(nl[i])
25.ift >= randdo:
26.nll[i] = 1
27.else:
28.nll[i] = 0
29.Evaluate new fitness of nl[i]
30.add (nl) cases to (l) cases
31.Update all compartment
32.Update best solution so far
33.Increment e by 1
34.Endwhile
35.Compute feature count (fcount)
36.Return best solution, cost of best solution, fcount
```  
**Algorithm 1**Pseudocode of the BEOS Algorithm  
Figure 5 is a flowchart of the entire optimization process of the algorithm. The figure provides a representation of the entire algorithm using a graphical method, including a graphic representation of the flow of the use of the transformation functions. The parting points for the S-functions and T-functions are shown clearly.