## 4 Results
### Feasibility of the ML Classification Approach
Furthermore, though impossible to understand on the basis of the results presented herein, there might be the case that the adopted performance index alone is not able to allow a proper classification; in such a situation, the label should then be based on a more complex evaluation of the input parameters affecting the behavior of the buildings. Better results could be achieved by increasing the number of instances in the dataset, e.g., through data augmentation. These aspects are beyond the scope of this work and will be investigated in future activities. To further assess the randomization effects, the outcome of the kNN algorithm is compared with that of an optimized DT classifier. Figure 11 depicts, in terms of the cumulative distribution functions (CDFs) of the algorithm, accuracies obtained with the 50 runs in relation to the training (Figure 11a) and the testing (Figure 11b) stages. With kNN, the training and testing accuracies respectively range between 83.3% and 92.6%, and between 72.5% and 97.2%; these values have to be compared with those related to DT, with the accuracy to range respectively in the intervals 96-100% and 85-100%. The highest  
Figure 10: kNN classifier (run 21): confusion matrices relevant to the (**a**) training and (**b**) testing datasets. Figure 9: kNN classifier: effect of randomization on the training and testing accuracies. The highlighted trials are respectively characterized by to the maximum (run 16), minimum (run 21), and average accuracy (run 47). accuracy obtained with the DT classifier highlights the role of an adaptive hyperparameter optimization during the learning process, leading to DT plots far nearer to 100% and steeper, meaning that results are also less scattered than the kNN ones. Finally, to investigate the effect of handling a small dataset on the accuracies of the results, the DT classifier is run 1000 times, adopting a Bayesian optimization for all hyperparameters. For each run, data in the training and testing sets are randomly extracted from the whole dataset. In Figure 12, the corresponding pairs of accuracy for the randomized training and testing sets are depicted. The red colour is used for the training data, and the blue colour for the testing ones; a horizontal line provides the average value of all the 1000 runs, while the dotted lines bound the confidential interval featuring plus/minus the standard deviation. Training and testing average accuracies are obtained as 0.98 and 0.95, respectively; their variances are small in both sets, as summarized in Table 2 together with other statistical properties. Therefore, the DT classifier is remarkable for its stability, as confirmed by its training median accuracy of 0.99, meaning that only one observation out of the 108 handled is misclassified, and by the corresponding testing median accuracy of 0.97, again meaning that only one sample out of 36 is misclassified. The small number of samples in the testing set leads to a step-wise reduction in the accuracy, so that several points are located on some horizontal lines in Figure 12. ML processes can be prone to overfitting in case of small datasets [40], but in those cases training accuracy should be far higher than testing accuracy, and the testing variance should be significant, which is instead not shown in the present case. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Accuracy Parameter** & **Training Set** & **Testing Set** \\ \hline Average & 0.9894 & 0.9517 \\ Standard deviation & 0.0126 & 0.0435 \\ Median & 0.9907 & 0.9722 \\ Variance & \(1.592\times 10^{-4}\) & 0.0019 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Statistical properties computed over the 1000 randomized runs via the optimized DT algorithm. Figure 11: Comparison between the performances of the kNN and DT algorithms, in terms of the CDFs of the accuracy during (**a**) training and (**b**) testing with the randomized datasets.