## 3 Results
### Supervised Machine Learning Models
#### 3.5.3 Created Models
In general, in the decision tree model, the accuracy of the prediction is affected by the minbucket parameter, which limits the minimum number of observations in a node. To obtain the best results, we tested the value of minbucket experimentally using cross-validation. We performed 15 experiments with minbucket, testing minbucket values from 1 to 15. Using results from five-fold-cross-validation, we selected the best value for the minbucket parameter (i.e., the value where the average MAPE error on the five cross-validation sets was minimal). Table 6 shows the results of the cross-validation of the RDT1 model--the best results were achieved at minbucket = 3. In a similar way, the minbucket optimization was performed with the model RDT2. The regressors for RDT2 were only variables correlated with the dependent variable. Based on the results of another five-fold-cross-validation procedure, the optimal value of minbucket was determined to be minbucket = 2. Table 7 shows the results from five-fold-cross-validation of the RDT2 model. Random Forest Models  
Finally, we created random forest models. To implement random forest models, we used the randomForest library in R. We also defined the number of trees using the three parameter. In our experiments, we set the number of trees \(\mathrm{ntree}=200\). In addition, we also tested the nodesize hyperparameter, which had the same function as the minbucket parameter. Based on \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{2}{c}{**Train Sets**} & \multicolumn{2}{c}{**Test Sets**} \\ \hline
**Minbucket** & **Avg MSE** & **Avg MAPE [in \%]** & **Avg MSE** & **Avg MAPE [in \%]** \\ \hline
1 & 0.01101541 & 4.357704 & 0.1626867 & 17.12107 \\
2 & 0.01465093 & 5.105888 & 0.1289060 & 15.28378 \\
3 & 0.02221390 & 5.937367 & 0.1136131 & 14.27289 \\
4 & 0.03621173 & 7.959550 & 0.1384408 & 15.65354 \\
5 & 0.04756119 & 8.912896 & 0.1359141 & 15.93231 \\
6 & 0.05120883 & 9.295309 & 0.1336549 & 15.67859 \\
7 & 0.06278420 & 10.166809 & 0.1579339 & 16.47122 \\
8 & 0.07063393 & 11.119335 & 0.1459742 & 15.58582 \\
9 & 0.09828617 & 13.099079 & 0.1573543 & 15.66941 \\
10 & 0.10388070 & 13.654471 & 0.1697236 & 16.36678 \\
11 & 0.10388070 & 13.654471 & 0.1697236 & 16.36678 \\
12 & 0.11220728 & 14.186691 & 0.1901627 & 17.63549 \\
13 & 0.11220728 & 14.186691 & 0.1901627 & 17.63549 \\
14 & 0.11233876 & 13.940644 & 0.1693422 & 16.58075 \\
15 & 0.11233876 & 13.940644 & 0.1693422 & 16.58075 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: RDT1 model error metrics, 5-fold cross-validation. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**Train Sets**} & \multicolumn{2}{c}{**Test Sets**} \\ \hline
**Minbucket** & **Avg MSE** & **Avg MAPE [in \%]** & **Avg MSE** & **Avg MAPE [in \%]** \\ \hline
1 & 0.01299025 & 4.895281 & 0.1109121 & 14.60411 \\
2 & 0.01670686 & 5.748583 & 0.1001298 & 13.52104 \\
3 & 0.02569819 & 6.632120 & 0.1045627 & 13.68382 \\
4 & 0.03665586 & 7.921788 & 0.1398148 & 15.73569 \\
5 & 0.04813336 & 9.112613 & 0.1380231 & 16.14253 \\
6 & 0.05125344 & 9.369087 & 0.1400916 & 16.15284 \\
7 & 0.06278420 & 10.166809 & 0.1579339 & 16.47122 \\
8 & 0.07063393 & 11.119335 & 0.1459742 & 15.58852 \\
9 & 0.09828617 & 13.099079 & 0.1573543 & 15.66941 \\
10 & 0.10388070 & 13.654471 & 0.1697236 & 16.36678 \\
11 & 0.10388070 & 13.654471 & 0.1697236 & 16.36678 \\
12 & 0.11220728 & 14.186691 & 0.1901627 & 17.63549 \\
13 & 0.11220728 & 14.186691 & 0.1901627 & 17.63549 \\
14 & 0.11233876 & 13.940644 & 0.1693422 & 16.58075 \\
15 & 0.11233876 & 13.940644 & 0.1693422 & 16.58075 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: RDT2 model error metrics, 5-fold cross-validation. performed experiments, we determined the most appropriate nodesize value. We constructed two random forest models. Model RF1 used as inputs all independent variables, while the model RF2 used as inputs only variables that were statistically significantly correlated with the dependent variable. Table 8 shows the results of performed five-fold-cross-validation for the RF1 model.