# Prediction Models for the Milling of Heat-Treated Beech Wood Based on the Consumption of Energy
## 3 Results and Discussion
Before testing the data, defining the dependent (target) and independent variables (input) for the most suitable mathematical model was necessary. The independent variables were the feed speed \(v_{f}\), the angular geometry of the tool \(\gamma\), the cutting speed \(v_{c}\), and the hydrothermal modification of the material \(T\). The dependent variable was the cutting power \(P\). After definition, the type of each variable was chosen, either categorical or continuous, which is displayed in Table 7. In the next step, data training and the calculation of the basic statistics of the model were performed, and all the data were used as input in the training stage. The data were evaluated as suitable for creating a mathematical model. The last step was the selection of methods, where the model methods were C&RT (classification and regression  
Figure 8: Prediction of random forest model. Figure 10: Prediction of neural network model. Figure 9: Prediction of boosted tree model. Based on the linear regression results of the correlation matrix and training residuals (Table 8), it was possible to determine the most appropriate mathematical method for modelling a woodworking process for this type of data. As shown in Table 8, the highest correlation coefficient \(r^{2}\) was achieved with the C&RT decision tree method, where the value was 0.87. The correlation coefficient of the worst model changed by 12% compared to the best. However, it is still possible to claim that all models can be characterised as models with high explanatory power (correlations from 0.7 to 0.9). Therefore, based on the value of the correlation coefficient, the most appropriate method for creating the mathematical model is the C&RT method. The authors of [34] used a quadratic model to model a medium-density fibreboard helical up-milling process. The authors of [35] used response surface methodology to predict force during gypsum fibre composite milling. They achieved minimal relative errors between predicted and confirmatory test results, meaning that their models also had high prediction accuracy. The authors of [36] stated that power consumption could be used for the predictive modelling of wood milling with correlations from 0.92 to 0.99. The results of the correlation matrix can also be derived from the results of the linear regression graph based on the C&RT decision tree method, which is shown in Figure 7. The values of cutting power \(P\) obtained in the experiments are placed on the graph's horizontal axis, and the model's predicted values are placed on the vertical axis. It can be seen in the figure that the lowest deviation in the error rate was at lower values of cutting power, that is, at lower values of cutting speed, where the values were closest to the regression line, which represents the values predicted by the model. It is also evident from the graph that increasing the cutting power directly increases the error rate, i.e., the deviation from the values generated by the mathematical model. Figure 11: Prediction of support vector machine model. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Training Residual** & **Correlation Coefficient (\(r^{2}\))** \\ \hline C\&RT & 574.6 & 0.87076 \\ Random forests & 771.6 & 0.82316 \\ Boosted trees & 843.45 & 0.80379 \\ Neural network & 857.57 & 0.79962 \\ SVM & 1284.69 & 0.77435 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Correlation matrix of regression models. The last step in creating a mathematical model was generating the decision tree of material processing based on the consumption of electricity, which is the cutting power \(P\), with the appropriate tree structure table. A part of the tree structure table is shown to explain individual abbreviations in the table (Table 9). In the decision tree table, it is possible to see the ID, which is the designation of the node in the tree structure and, at the same time, the position of the node in the table. The number of nodes in the given subgroup is displayed for the identifiers of individual nodes.