## 4 Result
### Result of ML Techniques
#### 4.2.2 Decision Tree Regression (Decision Tree Regression Model)  
The decision tree regression model for the analysis of the impact force of conveyor belts is again created using the same training set of samples as in the regression model. The decision criterion is the continuous variable Impact Force (F). The input variables are the height of the impact (H), the weight of the falling hammer (W), the type of impactor (I) and the strength of the conveyor belt (S). The first two variables were applied to some level of the tree (Figure 8). The decision tree regression model was built up to the maximum possible depth or until the fulfillment of the default criteria of the minimum number of observations in the node (minsplit = 20) and the minimum number of observations in the leaf node (minbucket = 7). This approach leads to an extremely complex tree that can potentially be trained on training data. During the tree-building process, and then using the printcp() function, the rpart algorithm performs an internal k-fold cross-validation, by default 10 times (xval = 10). For each possible substructure of the tree (each possible pruned tree), the relative error of cross-validation (X-val Relative Error) is calculated. The primary objective was to minimize this relative error of cross-validation. Based on the results, the value of the complexity parameter (CP) was selected that corresponded to the lowest average error of cross-validation (in our case, CP = 0.01 for a 9-node tree). The maximum number of levels (branches) of the tree from the root node to the outermost leaf node was set at 30. The importance of the variables (H = 76, W = 23) in the context of a decision tree regression indicates that the most important variable in the decision tree is the height of impact (H). In second place is the variable weight of the falling material (W). Two variables were not used in the creation of the model: the type of impactor and the strength of the  
Figure 8: Decision tree regression model. conveyor belt. The variables weight of the falling hammer and strength of the conveyor belt, according to the model output, did not bring any improvement in node subdivision and model creation, which may indicate their negligible impact on the regression decision model and on prediction. Despite the fact that the strength of the conveyor belt (S) and the impactor of the hammer (I) are also statistically significant variables in the regression model, these variables are not present in the decision tree regression. This may also be due to the fact that it is the height and weight variables that can explain most of the variability of the observed impact force, and the contribution from other variables such as impactor and strength are then not decisive in the formation of the tree. The first branching is based on the variable height (H, Figure 8). If the height is less than 0.5 m (17% of all tested samples found in the given group), the impact force is an average of 6.6 kN. If the impact height is in the range from 0.5 m to 1.1 m and the weight is less than 75 kg (or more than 75 kg), then the average impact force is 10 kN and there are 33 samples (13%) in the group (or 16 kN, in the group with 25 samples, 10%). A detailed overview of the rules can be found in Table 4.  
The accuracy of the model for prediction was verified using a test group. The results MSE = 9.22 and MAE = 2.46 show that the created model is good and can explain a significant part of the variability. The value for R\({}^{2}\) is 0.85, which means that the resulting regression tree can explain 85% of the variability in the target variable F on the test data. This suggests that the regression tree is able to capture the relationship between the input variables (H, W, I, S) and the output variable F very well. Figure 9 shows a graph of the actual values and predicted values that were obtained from the test group. The actual impact force values are shown on the \(x\) axis and the predicted impact force values are shown on the \(y\) axis.