## 3 Results and Discussion
### Machine Learning Prediction of Porosity  
In order to predict the TBCs' porosity using machine learning, the dung beetle optimizer algorithm was employed to optimize the random forest regression model. More precisely, the previous sections involved conducting correlation analysis among the THz multi-feature parameters through the construction of a correlation heatmap and conducting \(p\)-value tests. The purpose of the correlation analysis was to determine the relationships between the feature parameters, identify the influential features for porosity prediction, and eliminate any potential redundant information among them. This approach effectively reduced the feature dimensionality, leading to improved model efficiency and predictive capability. During the porosity prediction process, the random forest regression model was optimized using the dung beetle optimizer algorithm. The DBO, which simulated the foraging behavior of fireflies, was employed to search for the optimal solution through an adaptive search and iterative update process. By optimizing the model parameters, the RF model was able to fit the porosity data more accurately. This optimization aimed to improve the RF model's ability to predict porosity and enhance its predictive performance. Subsequently, the 11 extracted features were merged as input, and the optimized  
Figure 16: Correlation and significance analysis of multi-feature fusion. T1 is kurtosis; F1 is center frequency; F2 is frequency bandwidth; F3 is APSD; P1 and P2 are the first and second derivatives; R1, R2, R3, R4, and R5 are average reflectance, reflectance standard deviation, maximum reflectance, minimum reflectance, and reflectance peaks, respectively. RF regression model was utilized to predict porosity. Figure 17 shows the three curves depicting the test values of porosity and the predicted values of the RF model and DBO-RF model, respectively. Comparing these curves, it was evident that the predicted values of the DBO-RF model closely matched the test values, while the RF model exhibited significantly lower predictive accuracy compared to the DBO optimized model. This observation clearly demonstrated the remarkable optimization effect of the DBO algorithm, which led to a substantial improvement in predictive accuracy. Following the feature extraction, correlation and significance analysis, and model optimization, an optimized model was obtained for porosity prediction. To objectively evaluate and validate the performance of the model, K-fold cross-validation was employed. Cross-validation was a prevalent approach for assessing model performance that mitigated dependence on a single training and testing set to split, thereby enhancing the model's stability and reliability. In this study, five-fold cross-validation was implemented to evaluate the model's consistency and generalization ability. Figure 18 exhibited the iteration diagram for each fold, allowing for the assessment of the convergence behavior and performance metrics of the DBO-RF model. The figure highlighted that the five folds attained convergence after 159, 274, 154, 262, and 237 iterations, respectively, underscoring a relatively swift convergence rate. After cross-validation, the accuracy and robustness of the DBO-RF prediction model need to be evaluated. Through evaluation indicators, root-mean-square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and regression coefficient (R\({}^{2}\)) were used to measure the performance of the model. Additionally, Table 1 provides a comprehensive evaluation indicator, including performance metrics for each fold and the overall average evaluation index of DBO-RF-Crossvalind. Obviously, the prediction error of each fold was very small, and the regression coefficient was about 0.9. The mean error values of RMSE, MAE, and MAPE were 1.802, 1.549, and 8.362, respectively. The mean regression coefficient was 0.912. The model has excellent prediction accuracy.