## 3 Methodology
### Bacterial Foraging Optimization Algorithm  
The bacterial foraging optimization algorithm (BFOA) is a population-based stochastic optimization technique inspired by the foraging behavior of _Escherichia coli_ (_E. coli_) bacteria introduced by [PERSON] in 2002 [51]. Assume that the population of bacteria has \(S\) numbers, and that the present chemotactic, reproductive, and elimination-dispersal steps are represented by \(t\), \(r\), and \(e\), respectively. At the \(t\)-th chemotactic step, \(r\)-th reproduction, and \(e\)-th elimination dispersal, the \(n\)-th bacterium's location in the \(D\)-dimensional search space can be represented as follows:  
\[\theta^{n}(t,r,e)=\left\{\theta^{1}_{n}(t,r,e)+\theta^{2}_{n}(t,r,e),\ldots.\ldots,\theta^{D}_{n}(t,r,e)\right\} \tag{14}\]  
The prominent processes take place in BFOA consisting of chemotaxis, swarming, reproduction, and elimination-dispersal are described briefly below:  
* Chemotaxis: It is a process by which bacteria navigate their environment in response to chemical gradients. This behavior allows them to locate favorable conditions, such as nutrient sources. Bacteria achieve chemotaxis through a series of short runs (swims) and tumbles. Flagellar rotation determines their movement: swimming in a defined direction or tumbling to explore new areas. A unit-length random direction vector as described in Equation (15) representing a tumble for the \(n\)-th bacterium at the \(t\)-th chemotactic step, \(r\)-th reproductive step, and \(e\)-th elimination dispersal step. This vector describes the direction change after a tumble. Figure 3: Structures of LSSVM. \[\varphi(j)=\frac{\Delta_{i}(t,r,e)}{\sqrt{\Delta_{i}^{T}(t,r,e)\Delta_{i}(t,r,l)}} \tag{15}\]  
\[\theta^{n}(t+1,r,e)=\theta^{n}(t,r,e)+C(i)\varphi(j) \tag{16}\]  
where \(\theta^{n}(t+1,r,e)\) represents the \(n\)-th bacterium at the \(t\)-th chemotactic step, \(r\)-th reproductive and \(e\)-th elimination dispersal step. \(C(i)\) is the size of the step taken in the random direction specified by the tumble (the run length unit) and \(\Delta_{n}(t,r,e)\) denotes a random direction vector that describes the movement direction of the \(n\)-th bacterium. Swarming: Swarming is a collective behavior in bacteria that promotes their movement towards areas with higher nutrient concentrations. This phenomenon is modeled by introducing an additional cost function term (\(J_{cc}\)) that influences the overall cost function (\(J\)) experienced by each bacterium. The swarming cost (\(J_{cc}\)) considers both the local bacterial density and the distance between individual bacteria. The mathematical representation of the swarming process is expressed by Equation (17):  
\[ \begin{array}{c}J_{cc}(\theta,P(t,r,e))=\sum\limits_{n=1}^{s}j_{cc}^{n}( \theta,\theta^{n}(t,r,e))\\ \\ =\sum\limits_{n=1}^{s}\left[-d_{attract}\exp\left(-\omega_{attract}\sum\limits_{n=1}^{m} \left(\theta_{n}-\theta^{n}\right)^{2}\right)\right]\\ \\ \hskip 142.26378 pt+\sum\limits_{n=1}^{s}\left[\ h_{repellant}\exp\left(-\omega_{ repellant}\sum\limits_{n=1}^{m}\left(\theta_{n}-\theta^{n}\right)^{2}\right)\right]\end{array}  \tag{17}\]  
The coefficients associated (\(d_{attract}\), \(\omega_{attract}\), \(h_{repellant}\), and \(\omega_{repellant}\)) influence the relative importance of swarming compared to the original cost function (\(J\)). These coefficients need to be carefully chosen or tuned to achieve optimal performance in the BFOA. * Reproduction: The reproduction step happens following a predefined number of chemotactic steps (Nc). This step promotes the propagation of \"fitter\" bacteria within the population. Bacteria with higher health values, typically determined by a fitness function have a greater chance of reproducing. Conversely, bacteria with lower health values will be eliminated. This mechanism ensures a constant population size while favoring individuals with better foraging abilities.