## 3 Results
Figure 4: Principal component analysis data visualization on a two-dimensional plane. The hierarchical clustering method grouped the observations from the original dataset into six homogeneous clusters. There were six clusters due to the fact that the analyzed objects were rated by experts according to the degree of mold bloom. This enabled verifying the correctness of the clusters created by the algorithm. The dendrogram in Figure 7a shows the differences between the groups of observations allowing for the creation of clusters. Meanwhile, Figure 7b shows where the observations belonging to each of the created clusters are located on the PCA plane. The observations from each sample are all assigned to one of the clusters, so they are homogeneous. According to Table 3, cluster 6 containing the observations from the clean air sample and cluster 3 with the B5 sample did not contain elements from the other observed groups. Cluster 5 contained the observations from the wood sample and object B7, which was significantly infested by mold. In cluster 4, there were observations from samples B6, B8, and B9, some of which were non-molded objects and some had light mold bloom. It can be seen that the worst classified group comprised the non-molded objects, which were classified into four different clusters. The overall correctness of the classification by hierarchical clustering could be assumed as 48.2%. Figure 5: Metric multidimensional scaling mapping on a two-dimensional plane. Figure 6: [PERSON] self-organizing map. Thus, the dataset consisted of 1672 observations, which were randomly divided in a 2:1 ratio, where \(\frac{2}{3}\) of the data were used in teaching supervised learning models, and the remainder became the training set for the models. The hyperparameters of the neural network were tuned using a five-fold cross-validation. The grid was three-level for each hyperparameter, and the tuned values, when possible, were equidistant from each other. The parameters tuned were the number of hidden units at levels \(1,\ 5,\ \text{and}\ 10\); the number of epochs at levels \(50,\ 125,\ \text{and}\ 200\); and the value of the regularization parameter at levels \(10^{-10},\ 10^{-5},\ \text{and}\ 1\). The result of model tuning can be seen in Figure 8. The model with the number of hidden units equal to 5, 125 training iterations, and a regularization parameter equal to 1 turned out to be the most optimal. On the training set, it achieved 100% correctness in classifying samples into the classes determined by the degree of mold bloom. The neural network achieved the same correctness for a model with 10 hidden units and two models with 200 iterations of training, but a model that was less computationally complex was chosen. The selected model on the test set also achieved perfect classification in all of the samples considered, as it can be observed in Figure 9, which shows the diagonal classification error matrix. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**ObservedPredicted** & **Cluster 1** & **Cluster 2** & **Cluster 3** & **Cluster 4** & **Cluster 5** & **Cluster 6** \\ \hline Air & 0 & 0 & 0 & 0 & 0 & 174 \\ \hline None & 162 & 176 & 178 & 352 & 0 & 0 \\ \hline Fine Stains & 0 & 0 & 0 & 177 & 0 & 0 \\ \hline Visible & 35 & 0 & 0 & 0 & 0 & 0 \\ \hline Significant & 0 & 176 & 0 & 0 & 176 & 0 \\ \hline Totally stricken & 0 & 0 & 0 & 0 & 66 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Classification of objects into individual clusters formed by hierarchical clustering. Figure 7: Results of the hierarchical clustering algorithm: (**a**) dendrogram and (**b**) assigned clusters on the plane derived from PCA coordinates. The random forest model was supposed to be tuned based on a grid of hyperparameters, but it turned out that regardless of their selection, all of the models had 100% classification accuracy. Therefore, a model with default parameter values was used, i.e., 500 trees built in the forest, 3 variables possible to divide at each node, and a minimum of 1 observation at each tree node.