## 2 Materials and Methods
### Machine Learning Prediction and Performance Evaluation  
#### 2.5.1 Dung Beetle Optimization Algorithm  
Dung beetle optimizer (DBO) was an innovative swarm intelligence optimization algorithm proposed in late 2022, primarily inspired by the dung beetle's behaviors of ball rolling, dancing, foraging, stealing, and breeding [49]. In nature, dung beetles have been observed compacting feces into a spherical ball and utilizing celestial cues for navigation to ensure the dung ball is rolled in a straight line. However, in the absence of any light source, the trajectory of dung beetles deviates from a straight line.  
To mimic the rolling ball behavior and employ solar navigation, the DBO algorithm enables dung beetles to move in a predetermined direction across the entire search space. Additionally, during the rolling process, the dung beetle's position is updated using the following formula:  
\[x_{i}(t+1)=x_{i}(t)+\alpha\times k\times x_{i}(t-1)+b\times\Delta x \tag{26}\]  
\[\Delta x=|x_{i}(t)-X^{w}| \tag{27}\]  
where \(t\) is the number of the current iteration, \(x_{i}(t)\) is the position information of the \(i\)-th dung beetle at the \(t\) iteration, \(k\epsilon(0,0.2]\) is a constant representing the deflection coefficient, \(b\epsilon(0,1)\), \(\alpha\) is the natural coefficient of \(1\) or \(-1\), \(X\) is the global worst position, and \(\Delta x\) is the change in simulated light intensity.  
When confronted with an obstacle, the beetle reorients itself. Therefore, the location is updated:  
\[x_{i}(t+1)=x_{i}(t)+\tan\theta|x_{i}(t)-x_{i}(t-1)| \tag{28}\]  
where \(|x_{i}(t)-x_{i}(t-1)|\) is the difference between the \(t\) and \(t-1\) iterations of the \(i\)-th beetle.  
Dung beetles will roll the dung ball to a safe location. As shown in Figure 6, a boundary selection strategy is proposed to simulate the area where female dung beetles lay their eggs:  
\[R=1-t/T_{\max} \tag{29}\]  
\[Lb^{*}=\max(X^{*}\times(1-R),Lb) \tag{30}\]  
\[Ub^{*}=\min(X^{*}\times(1+R),Ub) \tag{31}\]where \(R\) is the scale coefficient, and \(T_{\max}\) is the maximum number of iterations. \(X\) is the current local optimal location, and \(Lb^{*}\) and \(Ub^{*}\) are the lower and upper bounds of the spawning area, respectively. \(Lb\) and \(Ub\) are the lower and upper bounds of the optimization problem, respectively.  
During the iteration process, the position of the oocytes changes dynamically:  
\[B_{i}(t+1)=X^{*}+b_{1}\times(B_{i}(t)-Lb^{*})+b_{2}\times(B_{i}(t)-Ub^{*}) \tag{32}\]  
where \(B_{i}\) is the position of the oosphere, and \(b_{1}\) and \(b_{2}\) are random vectors of 1 \(\times\) D dimension.  
The optimal feeding area is established, and the young dung beetles are guided to forage. The optimal feeding area is defined as follows:  
\[Lb^{b}=\max\left(X^{b}\times(1-R),Lb\right) \tag{33}\]  
\[Ub^{b}=\min\left(X^{b}\times(1+R),Ub\right) \tag{34}\]  
\[x_{i}(t+1)=x_{i}+C_{1}\times\left(x_{i}(t)-Lb^{b}\right)+C_{2}\times\left(x_{ i}(t)-Ub^{b}\right) \tag{35}\]  
where \(X^{b}\) is the global optimal position, \(Lb^{b}\) and \(Ub^{b}\) are the lower and upper bounds of the optimal feeding area, respectively, and the position of little dung beetles is updated. \(x_{i}\) is the beetle's position, \(C_{1}\) is a random number with a normal distribution, and \(C_{2}\) is a random vector.  
Assuming \(X^{b}\) is the best place to compete for food, the thieving beetles are updated.  
\[x_{i}(t+1)=X^{b}+S\times g\times\left(\left|x_{i}(t)-X^{*}\right|+\left|x_{i}( t)-X^{b}\right|\right) \tag{36}\]  
All agents are randomly initialized, and the settings are distributed as shown in Figure 7. According to the different types of agents, the positions of the rolling dung beetle, the egg ball, the small dung beetle, and the thief are updated by choosing the appropriate way. Finally, the optimal position \(X^{b}\) and its fitness value are output.  
Figure 6: Selected rules for boundary limits.