## 4 PCA-IWOA-XGBoost Model Construction and Prediction Result Analysis
### Training Results and Model Evaluation  
After determining the model hyperparameters, training and prediction were conducted using the XGBoost, PCA-XGBoost, IWOA-XGBoost, and PCA-IWOA-XGBoost models. XGBoost and IWOA-XGBoost utilized the original data, while PCA-XGBoost and PCA-IWOA-XGBoost used principal component data. The prediction results of the four models on the test set are shown in Figure 12, and a comparison of their performance metrics is presented in Table 9.  
Figure 11: Fitness of the PCA-IWOA-XGBoost Model. Figure 12: Comparison of predicted values and actual values for four models. As can be seen from the Figure 12, the predicted values of PCA-IWOA-XGBoost were largely consistent with the actual values, while other models exhibited certain deviations from the actual values. The analysis table reveals that PCA-IWOA-XGBoost led the models with an average accuracy of 96.9%, significantly outperforming XGBoost (87.8%), PCA-XGBoost (90.2%), and IWOA-XGBoost (93.6%), indicating that the integration of PCA and the IWOA substantially enhanced the model's adaptability to different data points. Secondly, data distribution analysis showed varying deviations between the predicted and actual values across samples; for instance, sample 3 (actual value 743) exhibited larger deviations, with XGBoost predicting 636.8 (deviation 106.2), PCA-XGBoost predicting 821 (deviation 78), and PCA-IWOA-XGBoost predicting 768.3 (deviation 25.3), demonstrating a significant reduction in deviation and reflecting its robustness in handling extreme values and data noise. Additionally, the average accuracy improvement of PCA-XGBoost over XGBoost (90.2% vs. 87.8%) suggests that dimensionality reduction via principal component data reduced redundant information and optimized the model input, while the introduction of IWOA further narrowed prediction errors, as evidenced by IWOA-XGBoost's average improvement of approximately 5.8 percentage points over XGBoost. In terms of data consistency, PCA-IWOA-XGBoost exhibited the smallest accuracy fluctuation across all samples (95.9% to 97.6%), with a standard deviation of about 0.5%, compared to XGBoost's larger fluctuation (85.7% to 88.6%, standard deviation about 0.9%), indicating a stronger predictive stability. Finally, the data point for sample 12 (actual value 10) shows PCA-IWOA-XGBoost predicting 9.8 (deviation 0.2) with a 97.6% accuracy, outperforming the other models and confirming its excellent performance within low-range values. Overall, the data analysis supports PCA-IWOA-XGBoost as the optimal model, particularly for handling complex datasets and improving prediction accuracy. To further analyze the performance of the models, a comprehensive evaluation was conducted using the coefficient of determination, root mean square error, residual prediction deviation, and mean absolute error. Table 10 shows that the different models exhibited significant differences in predictive performance on the test set, with PCA-IWOA-XGBoost leading with outstanding results: a coefficient of determination (\(R^{2}\)) of 0.997, root mean square error (_RMSE_) of 8.751, mean absolute error (_MAE_) of 5.366, and residual prediction deviation (_RPD_) of 24.422, comprehensively surpassing the other models. In contrast, the baseline XGBoost model had performance metrics of \(R^{2}\) 0.936, _RMSE_ 34.719, _MAE_ 20.466, and _RPD_ 6.155, indicating higher prediction errors and lower stability. PCA-XGBoost improved on this with \(R^{2}\) 0.966, _RMSE_ 25.578, _MAE_ 15.133, and _RPD_ 8.354, demonstrating that principal component analysis (PCA) effectively reduced data noise.