# Construction of a Cutting-Tool Wear Prediction Model through Ensemble Learning
## 4 Results and Discussion
### Machine Learning  
The model training process involves hyperparameter tuning using the training dataset and evaluating the model through 5-fold cross-validation. The hyperparameter combination that performs the best is selected as the model's parameter configuration. Finally, the optimized base regression models, including decision tree (DT), random forest (RF), extra trees, XGBoost (XGB), LightGBM (LGBM), AdaBoost, stochastic gradient descent (SGD), support vector regressor (SVR), least squares support vector regressor (LSVR), and multi-layer perceptron (MLP), comprising ten models, are used to construct a voting regression model for predicting the test set. The predictive performance of different machine learning models is compared to assess whether there are differences in predictive performance between ensemble learning and individual machine learning models. The evaluation metrics used in this experiment include the coefficient of determination (R\({}^{2}\)), the root mean squared error (RMSE), the mean squared error (MSE), and the mean absolute error (MAE) to assess the model's performance.  
The coefficient of determination (R-squared, \(R^{2}\)) ranges between 0 and 1, with a value closer to 1 indicating that the model can fully explain all variations, while a value closer to 0 suggests that the model cannot explain any variations. A higher \(R^{2}\) implies a better predictive performance of the model. The relevant formula is given by Equation (2), where \(N\) represents the sample size, \(y_{i}\) represents the actual values, \(\hat{y}_{i}\) represents the predicted values, and \(\overline{y}\) denotes the mean of the actual values.  
\[R^{2}=1-\frac{\frac{1}{N}\sum_{i=1}^{N}\left(y_{i}-\hat{y}_{i}\right)^{2}}{ \frac{1}{N}\sum_{i=1}^{N}\left(y_{i}-\overline{y}\right)^{2}} \tag{2}\]  
The mean squared error (MSE) is the average of the squared differences between actual values and predicted values. A smaller MSE indicates a better predictive performance of the model. The relevant formula is given by Equation (3), where \(N\) represents the sample size, \(y_{i}\) represents the actual values, and \(\hat{y}_{i}\) represents the predicted values.  
\[\text{MSE}=\frac{1}{N}\sum_{i=1}^{N}\left(y_{i}-\hat{y}_{i}\right)^{2} \tag{3}\]  
The root mean square error (RMSE) is a commonly used evaluation metric in regression tasks. It is the square root of the average of the squared differences between actual values and predicted values. A smaller RMSE indicates a better predictive performance of the model. The relevant formula is given by Equation (4), where \(N\) represents the sample size, \(y_{i}\) represents the actual values, and \(\hat{y}_{i}\) represents the predicted values.  
\[\text{RMSE}=\sqrt{\frac{1}{N}\sum_{i=1}^{N}\left(y_{i}-\hat{y}_{i}\right)^{2}} \tag{4}\]  
The mean absolute error (MAE) is a commonly used evaluation metric in regression tasks. It is the average of the absolute differences between actual values and predicted values. A smaller MAE indicates a better predictive performance of the model. The relevant formula is given by Equation (5), where \(N\) represents the sample size, \(y_{i}\) represents the actual values, and \(\hat{y}_{i}\) represents the predicted values.  
\[\text{MAE}=\frac{1}{N}\sum_{i=1}^{N}\left|y_{i}-\hat{y}_{i}\right| \tag{5}\]