## 2 Description of the Model  
The operation of random forests (RF) involves conducting of a classification using a group of decision trees. The bagging method is used to create a random forest composed of decision trees--the trees are independent of each other and have the same weight, whereas the result of the classifier is the mode (the most frequent value) of the classes detected by individual trees [17; 18]. Each tree is constructed based on a random sample of \(n\) observations taken (with replacement) from the training set (bootstrapping). In addition, the attributes (variables) selected in the construction of each tree are also randomly chosen. During the construction of the tree, at each node, the splitting is performed by randomly selecting (without replacement) \(m\) out of \(p\) attributes (\(m\leq p\)). Parameter m is most often determined in the following way: \(m=\surp\), which is suggested in the subject literature [19]. This process is repeated at the subsequent node, and the building of the tree without cutting continues, if possible, until the leaves contain elements from just one class. A given observation vector is classified by all the trees, and it is then finally classified into the class in which it occurred most often. The advantage of the random decision forest technique is the reduction in variance and the increase in the stability of the classification model. An example of a random forest with a simplified reasoning scheme is shown in Figure 1.  
In order to build a model for the non-destructive assessment of the moisture content of historical brick walls on the basis of the random forest algorithm, a data set was created as part of the research, which includes 290 sets of results. Each of the 290 sets of results contains seven numerical values, hereinafter referred to as parameters. This set was published as an appendix to paper [16]. For the purpose of creating the data set, archival and experimental research was carried out in ten historical buildings with walls made of ceramic bricks and lime mortar. These buildings were erected in different historical periods; the oldest is dated to the 1280s, and the youngest to the 1930s. First, in order to determine the \(Y\) (-) parameter which represents the year of building construction, for each of the buildings, archival research was carried out based on the analysis of available historical sources and documents. Parameter \(Y\) is related to the time of exposure of the walls to moisture and salts, as over time, an increasing volume of pores in the wall is filled with water, which is drawn up by capillary action and hygroscopically absorbed from the air [20,21]. Afterwards, experimental studies were conducted in the laboratory, as well as in situ in 290 measuring points located on brick walls and vaults. Two dimensionless parameters \(X_{D}\) (-) and \(X_{M}\) (-) which indirectly describe the humidity content of the wall were determined by non-destructive dielectric (Gann Hydrometric Uni 2 m with an active ball probe) and microwave (Trotec T 600 m) methods. Parameters \(X_{C}\) (%), \(X_{S}\) (%) and \(X_{A}\) (%) which describe the molar concentration of the chloride, sulphate and nitrate salts in the wall were determined by the semi-quantitative method. These salts, which are commonly present in brick walls (penetrate into the structure of a wall along with capillary water from the environment surrounding the buildings), affect the results of tests conducted using the dielectric and microwave methods by overestimating or underestimating the measurement  
Figure 1: An example of a classification scheme using a random forest, which is built from many different decision trees. results [22]. Meanwhile, the \(U_{m}\) (%) parameter which describes the actual humidity of the wall was determined by the gravimetric method with the use of a laboratory dryer. The obtained results of the \(U_{m}\) tests fell within wide ranges, from ca.