## 4 Modeling
### Model Training
To balance accuracy with computational efficiency, the iteration count was set to 100. Before optimization, the fitness function needs to be defined. The cross-entropy loss function, widely used in classification tasks, measures the difference between the predicted probabilities of each class and the actual labels. The lower the cross-entropy loss, the higher the model's predicted probability for the true class. The iteration convergence graph of the ZOA-XGBoost model is shown in Figure 4. As the number of iterations increases, the fitness values of different populations decrease, and the models with different population sizes achieve the lowest loss at the end of optimization. The larger the population size, the faster the model converges. Around the 45 th iteration, the fitness values of all models stabilize, reaching the optimal state of optimization. After completing ZOA-XGBoost training, the optimal hyperparameters and training time corresponding to different population sizes were obtained. The optimal hyperparameters for different models are shown in Table 3. The training accuracy and training time of the various models are illustrated in Figure 5. Typically, the optimal population size is determined by the lowest cross-entropy loss value. Figure 4 shows that the loss value of the model decreases as the population size increases. The model with a population size of 130 has the lowest loss value in 100 iterations. However, this study also considered training time in the model evaluation. When models have similar predictive performance on the same dataset, those with shorter training times are preferable. Figure 5 shows that the ZOA-XGBoost models achieve an accuracy of 1 across different population sizes, indicating excellent predictive performance during training. It can also be observed that the model  
Figure 4: Iterative convergence graph of the ZOA-XGBoost model. with a population size of 30 has the shortest training time, thus making it the optimal ZOA-XGBoost model. In optimizing the model using BO, the same model hyperparameters and iterations as in ZOA were adopted. BO comprises two core components: the probabilistic surrogate model and the acquisition function. This study used a Gaussian process as the probabilistic surrogate model and gp_hedge as the acquisition function to leverage the advantages of multiple acquisition functions, enhancing optimization efficiency and performance. The fitness value variation curve of the BO-XGBoost model with the number of iterations is shown in Figure 6. The cross-entropy loss value significantly decreases within the first 10 iterations and stabilizes after 29 iterations. The convergence of the iterative curve is fast and effective, demonstrating the effectiveness and superiority of the BO method in optimization problems. Ultimately, the BO-XGBoost model achieved a training accuracy of 0.983, with the optimal hyperparameter combination determined as follows: \"n_estimators = 241, max_depth = 25, learning_rate = 1, gamma = 0, reg_alpha = 1, and reg_lambda = 11.2811\". Figure 5: Training accuracy and training time for ZOA-XGBoost. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{6}{c}{**Hyperparameters**} \\ \cline{2-7}  & n\_Estimators & Max\_Depth & Learning\_Rate & Gamma & Reg\_Alpha & reg\_Lambda \\ \hline ZOA-XGBoost-30 & 161 & 4 & 0.2212 & 0.0001 & 1.0042 & 1.4136 \\ ZOA-XGBoost-50 & 125 & 4 & 0.3824 & 0.0020 & 1.0002 & 1.4090 \\ ZOA-XGBoost-70 & 121 & 4 & 0.2494 & 0.0002 & 1.0027 & 1.7869 \\ ZOA-XGBoost-90 & 98 & 4 & 0.3771 & 0.0011 & 1.0006 & 1.7440 \\ ZOA-XGBoost-110 & 59 & 4 & 0.3823 & 0 & 1.0000 & 1.1562 \\ ZOA-XGBoost-130 & 102 & 4 & 0.3461 & 0.0004 & 1.0002 & 1.0101 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Optimal hyperparameters for ZOA-XGBoost.