# Explainable Ensemble Learning Model for Residual Strength Forecasting of Defective Pipelines
## 3 Case Study  
### Evaluation of Predictive Performance  
To assess the predictive performance of the proposed hybrid model, the performance of BO-XGBoost was compared with that of five other models: RF, LightGBM, SVM, GBRT, and MLP. Figure 11 displays the distribution histograms of prediction errors for the six models. The horizontal coordinate is the distribution interval of prediction error values, and the vertical coordinate is the frequency density, reflecting the concentration of prediction error values in each interval. Meanwhile, the \(\mu\) and \(\sigma\) of the forecast error are given in Figure 11. As illustrated in Figure 11, the MLP model exhibits the most significant mean and standard deviation of prediction errors, followed by SVM, LightGBM, and GBRT. The mean and standard deviation of the prediction errors from the RF model are only surpassed by those of BO-XGBoost. The BO-XGBoost model demonstrates a minor mean and standard deviation in prediction errors compared to the other five models, indicating its superior predictive performance.  
To further assess the predictive performance of the hybrid model, a comprehensive assessment was conducted using metrics such as R\({}^{2}\), MAPE, and RMSE. The prediction results are shown in Figure 12. Combining R\({}^{2}\), MAPE, and RMSE and fitting curves reflects the predictive performance of different models. The study found that the MLP model had the worst predictive performance, with R\({}^{2}\), MAPE, and RMSE values of 0.938, 0.103, and 1.377, respectively. The SVM model performed better than MLP, with values of 0.947 for R\({}^{2}\), 0.091 for MAPE, and 1.362 for RMSE. The R\({}^{2}\), MAPE, and RMSE values for LightGBM were 0.946, 0.089, and 1.359, respectively; for GBRT, the values were 0.954, 0.077, and 1.344; for RT, the values were 0.963, 0.062, and 1.287; and for BO-XGBoost, the values were 0.971, 0.055, and 1.263. The prediction effect of the above models becomes more successful, among which  
Figure 10: Predictive framework process.  
BO-XGBoost has the best fitting effect. Due to the wide coverage of the dataset, the above prediction results also indicate that the BO-XGBoost model has a good range of engineering applications. However, the model requires substantial computational resources during the training process. In the future, further efforts should focus on optimizing hyperparameter tuning, data preprocessing, and parallelization or distributed computing techniques to reduce the computational demands of this method.  
In order to further evaluate the predictive performance of BO-XGBoost, combined with the R\({}^{2}\) index, it was compared with ASME B31G, BS 7910, and API 579. The R\({}^{2}\) values of BO-XGBoost, ASME B31G, BS 7910, and API 579 are 0.97, 0.52, 0.61, and 0.46, respectively. The results show that BO-XGBoost has a better prediction effect.  
To further evaluate the computational cost of the BO-XGBoost model, the training and testing times for MLP, SVM, LightGBM, GBRT, RT, and BO-XGBoost were calculated. The study revealed that the computational times required for the six models mentioned above were 12 s, 6 s, 3 s, 8 s, 2 s, and 32 s, respectively. BO-XGBoost exhibited the longest computational time due to its parameter tuning process. However, given its superior predictive accuracy and the fact that the computational time remains within an acceptable range, this model is deemed suitable for practical applications. Additionally, the computational time of BO-XGBoost could be further reduced through GPU acceleration.  
Figure 11: The distribution histograms of prediction errors.