## 4 Model Prediction Results and Analysis
### Comparison and Analysis of Prediction Performance  
Figure 12 shows a comparison of the correlations performed among the models trained by the GA-GBRT, BR, and SVR algorithms on the test set. Meanwhile, the correlation is defined by the correlation coefficient R. The solid line denotes the fitted value, and the broken line indicates that the actual value is identical to the predicted value. The R value ranges between 0 and 1, and if it is equal to 1, it signifies complete correlation. If it is equal to 0, it demonstrates that there is no relationship between the measured value and the predicted value. A value of R close to 1 indicates a close correlation. As revealed by Figure 12, when the test data of GA-GBRT is tested with 10 sets of test data, the R value is 0.9922, the R value of BR is 0.9785, and the R value of SVR is 0.9811. The model effects of the three algorithms are reliable. [PERSON] et al. (2013) used the neural network to predict the average surface roughness, which led to the discovery that the R value was 0.977. This was basically consistent with the BR model. The GA-GBRT produced the best fitting effect with the R reaching 0.9922. Figure 11: Support vector regression (SVR) prediction results. Figure 10: Heat map of grid search parameters. The performance of the model was subjected to assessment by using four evaluation indexes, namely, MAPE, RMSE, CV, and MAD. CV is defined as the ratio of the standard deviation to the mean and is expressed by Equation (9)  
\[\text{CV}=\frac{\sqrt{\frac{\sum_{i=1}^{N}\left(y_{i}-\hat{y}_{i}\right)^{2}}{N}} }{\overline{y}}\times 100. \tag{9}\]  
The MAPE is calculated as Equation (10) and is defined as the percentage of the calculated absolute error to evaluate how accurate the regression model is. RMSE is the root mean square error, the root mean square error is Equation (11), and MAD is the mean absolute error. The calculation formula is Equation (12). \[\text{MAPE}=\frac{1}{N}{\sum_{i=1}^{N}\frac{\left|y_{i}-\hat{y}_{i}\right|}{y_ {i}}\times 100} \tag{10}\]  
\[\text{RMSE}=\frac{\sqrt{\sum_{i=1}^{N}\left(y_{i}-\hat{y}_{i}\right)^{2}}}{N} \tag{11}\]  
\[\text{MAD}=\frac{1}{N}{\sum_{i=1}^{N}}{\left|\hat{y}_{i}-y_{i}\right|} \tag{12}\]  
where \(\hat{y}_{i}\) and \(y_{i}\) represent the predicted value and the actual observed value, respectively, \(\overline{y}\) and \(N\) indicate the average of the observed values and the total number of samples, respectively. In this paper, RMSE is taken as the major evaluation indicator. If the RMSE fails to indicate statistical differences between the four models, the other three evaluation indicators will be considered. The results of the four evaluation indicators for the five prediction models are presented in Figure 13, which reveals that GA-GBRT shows the minimum value in the four evaluation indexes of MAD, MAPE, RMSE, and CV. Therefore, GA-GBRT exhibits the highest prediction accuracy, followed by BR, SVR, LBM, and SCG. As GBRT combines multiple sets of basic learners so as to enhance the robustness to the noise of the training data, the prediction error is minimized, and the need for the data to be normalized during the training process is eliminated. In this paper, GA is applied to optimize the initial model parameters of GBRT, as indicated in Figure 7, the optimized model shows a strong generalization performance both in the training set and the test set. Compared with the other four machine learning algorithms, the prediction accuracy is superior, which makes it better suited to the prediction and optimization of surface roughness. Table 6 compares the results of the evaluation indicators in the five prediction models on the published milling surface roughness data set [9]. The RMSE of the GA-GBRT prediction model is capable to reach 0.0889, which is followed by the BR model.