Methodology of the quantitative assessment of the moisture content of saline brick walls in historic buildings using machine learning

Conducting moisture tests of brick walls in buildings under conservation protection is associated with many difficulties that result from the inability to freely interfere with historic tissue. The current paradigm of conducting such research, which assumes the use of just one non-destructive method, has many limitations that affect the accuracy of obtained results. Up-to-date research concerning an alternative non-invasive method, which allows reliable test results to be obtained in the case of the quantitative assessment of the moisture content of saline brick walls in historic buildings, has shown that it is possible to reliably assess such a moisture content using machine learning and two complementary non-destructive methods. In the article, the original methodology of such a quantitative assessment is described and presented in the form of block diagrams. The methodology consists of two stages. The first stage includes carrying out experimental and archival research in selected historical buildings to create a data set. The second stage involves generating a machine learning model for assessing the moisture content based on algorithms and the data collected in the first stage. The article is illustrated with an example of the application of the developed methodology to assess the moisture content of the brick walls of the Golden Gate building in Gdańsk. The presented example shows the reliability and practical usefulness of the developed methodology.


Introduction
Conducting moisture content tests of brick walls in buildings under conservation protection is not an easy task, because interference in the structure of their historic tissue is only possible to a very limited extent. This precludes the free use of the gravimetric method, which directly measures the mass moisture content, and is therefore considered the most reliable method of assessing it. This is due to the fact that it is based on taking wall samples for testing [1,2]. Thus, the tests of the moisture content of brick walls in historic buildings need to be carried out using non-destructive methods. There are many such methods known in the construction industry, and they were described, e.g., in papers [3][4][5].
According to publication [6], the choice of a specific method should depend on what kind of data need to be obtained (qualitative or quantitative), from what area the measurements will be taken (a larger area, or at a specific point), and for what purpose the measurements are for. Qualitative methods, which enable data to be obtained from a larger area, are therefore used to locate the damp zones of a wall and to monitor changes in the pattern of dampness over time [6,7]. In turn, methods that allow for the conducting of point measurements of a quantitative nature are particularly useful, e.g., to determine the level of the moisture content (based on the classification adopted in technical literature [8,9]), to estimate the costs, duration, and effectiveness of drying, or to evaluate the effectiveness of anti-moisture protection.
According to the available literature concerning case studies [e.g., [10][11][12], the common practice of conducting quantitative moisture assessment studies in historic buildings assumes the use of just one selected non-destructive method. The procedure for conducting such tests can be presented in the form of a diagram shown in Fig. 1.
The aforementioned paradigm of conducting moisture tests using just one non-destructive method has many limitations. The measurement of moisture content is carried out indirectly, which means that a physical or chemical property of the material, other than moisture, is measured. Therefore, to assess the moisture content, it is necessary to determine the mathematical relationship between the feature measured by a given method (parameter X) and the actual mass moisture content of the tested wall (parameter Um) [13,14], which involves the need to collect a certain number of samples of the material for testing using the gravimetric method in a laboratory. Basically, such a relationship should be developed for each newly tested object, because meter readings not only depend on the moisture content in the tested material, but also on its other characteristics (e.g., the types and concentrations of salts present in it), which can be different for each object [15]. Due to the legal protection of buildings being the subject of the research, the places of taking samples, as well as their weight and number, should be agreed with the conservation services. Further proceedings depend on the number of samples for which consent was obtained. Therefore, if it is possible to take samples equal to or greater than 30, the correlation relationship for a given building is determined on the basis of pairs of results U m − X, in accordance with the principles of mathematical statistics. If the number of samples taken is from 6 to 30, a hypothetical relationship is selected from those available in literature, as described in detail in [13,16]. It should be noted that in literature, the availability of such hypothetical relationships is low, and the results obtained on their basis are much less accurate than in the case of using the correlation relationship developed for the tested object. If the number of taken samples is less than 6, it is not possible to reliably determine the moisture value of the masonry walls/vaults of the building. This is the case when conservation services do not agree to take samples of material with a weight of 30-50 g, as they consider this to be too much of an interference in the historic tissue.
Bearing in mind the limitations indicated above, in recent years, attempts have been made to change the abovedescribed model of conducting research using a single non-destructive method. For example, Valero, Sasso, and Vicioso [17] used two non-destructive techniques: infrared thermography and the electrical resistance method to assess in situ the surface moisture content of the historic facades of the Santa Bárbara church in Santo Domingo. Balik et al. [18] combined infrared thermography with the capacitance method for the in situ inspection of the moisture of the basement floor of the Schebek Palace in Prague. In turn, Muradov et al. [19] developed a novel multispectral system comprised of microwave, photogrammetry, and terrestrial laser scanning technologies is introduced to identify in-wall moisture content and provide its precise location. The initial stage of this study was undertaken in the Museum of King Jan III's Palace at Wilanów.
For some time, work has also been carried out on the possibility of using non-destructive methods in conjunction with artificial intelligence to assess the moisture content of brick walls, e.g., the works of Rymarczyk et al. [20,21]. Their studies concerned a new method of testing moisture using electrical tomography and machine learning methods for the spatial analysis of wall moisture, with the correctness and usefulness of which being confirmed by in situ tests. A prototype of the hybrid tomograph that was used in this method was constructed, but according to the authors of the indicated works, it is also necessary to conduct further research to create the final version of the device-a compact portable device.
In addition, on the basis of research and analysis conducted by, e.g., the author of this study, it was shown that it is possible to reliably assess the moisture content of saline brick walls using non-destructive methods and machine learning [22][23][24]. This can be done based on several established parameters that were obtained during non-destructive testing, a parameter resulting from archival research related to the object in which the moisture content of the walls is tested, and machine learning algorithms. However, the literature lacks a methodology for such an assessment of the moisture content.
The aim of this article is therefore to fill the indicated gap in the literature by presenting an original and reliable methodology for evaluating the moisture content of brick walls. Such a methodology was developed on the basis of the author's own experience, which was gained both during moisture tests in many buildings erected in different historic periods, and analyzes carried out using artificial intelligence and the results of these tests. This methodology has not yet been published. The aim is also to present an example of its application in practice.
The structure of the article is as follows: chapter 1 is an introduction to the issue, chapter 2 presents and discusses the developed research methodology, and chapter 3 contains an example of the methodology's application. The last part of the paper contains the summary.

General description
The article proposes an original and reliable methodology for assessing the value of the moisture content of saline brick walls in historic buildings with the use of machine learning. The basis for its development are the results of the author's own research, and its resulting conclusions that prove the usefulness of artificial intelligence for assessing the value of the moisture content. The results of the studies in question were published in [22][23][24].
The following research methods were proposed in the methodology: the non-destructive dielectric method, the non-destructive microwave method, the destructive gravimetric method, the semi-quantitative method, and archival research. Carrying out tests with the above-mentioned methods allows for the obtaining of seven parameters at each test point. These are two dimensionless parameters X D and X M (determined non-destructively, and indirectly describing the moisture content of the wall), parameter U m (defined destructively, and describing the actual mass moisture content of the wall in percentage), three parameters X C , X S , X A (describing the percentage molar concentration of the chloride, sulfate, and nitrate salts contained in the wall, respectively), and the dimensionless parameter Y (describing the year of construction of the facility). A comparison of the research results obtained in [24] and [23] shows that the introduction of the Y parameter increases the accuracy of the prediction of the machine learning model. This parameter is related to the age of the buildings, and therefore to the time of exposure of the walls to moisture and salts. As explained in [13,25,26], 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. This process continues until the state of equilibrium moisture is formed in the wall, which state is then maintained over time. Along with water, harmful salts dissolved in it get into the wall, accumulate, and crystallize in it. These salts also hygroscopically absorb moisture from the surrounding air, which further increases the amount of moisture.
Machine learning algorithms (in the form of a random forest algorithm with the number of decision trees equal to 500) [24] and an artificial multi-layer unidirectional neural network (with back propagation error, the Levenberg-Marquardt learning algorithm, and a 6-6-1 structure) were used in the methodology [23]. The parameters X D , X M , X C , X S , X A , and Y were used as input variables in the learning, validation, and verification processes of the algorithms, and the U m parameter was used as the template in the learning processes. In turn, the evaluated output variable is the U mc parameter, which describes the value of the mass moisture content generated by the model.
The selection of methods for experimental research was based on the previous experience of the author of this publication, which was gained while conducting moisture tests in various historic buildings. Moreover, this was dictated, among others, by the accessibility and ease of use of the research equipment, the ease of conducting the research, and the credibility of the obtained results. It is also important that each of the indicated methods allows for a quantitative point measurement, the results of which can be presented in numerical form. Moreover, care was taken to ensure that the research methods used to obtain parameters X D , X M , X C , X S , X A , and Y (serving as input variables for the algorithms) did not interfere, or interfered minimally, with the building's material, which was acceptable by the conservation services.
The developed methodology for the quantitative assessment of the moisture content of saline brick walls in historic buildings with the use of artificial intelligence is graphically presented in the form of the general scheme in Fig. 2. The methodology was divided into two stages, each of which is discussed in detail below.

Description of stage I: implementation of experimental research
The first stage of the developed methodology is the implementation of experimental and archival research, the results of which will be used to build a data set for the purpose of teaching, testing, and verifying the artificial intelligence algorithm in stage II. The procedure leading to the construction of the data set is described below and graphically presented in Fig. 3.
In order for the set of obtained data to be as representative as possible, and for the final results of the numerical analyzes to have the widest possible application in construction practice, the research should be carried out in k historic buildings with brick walls erected in different historic periods. In each of the selected buildings, tests should be carried out in accordance with the following scheme.
First, for the selected building k = 1, an analysis of the available documentation and archival materials should be carried out to determine the year of its construction. The result of archival research should be recorded in the form of the dimensionless parameter Y. Due to the fact that in past epochs, the construction time of buildings often took many years, the year of construction (with an accuracy of 10 years) should be the year in which construction was completed. If it is possible to isolate parts of a building dating back to different periods, each of these parts should be considered separately, and the corresponding year of construction should be assumed. Afterward, on the surfaces of the masonry walls/vaults of the k = 1 building, n measuring points should be selected, in which non-destructive measurements will be conducted, and samples for testing in the laboratory will be taken. The measuring points should be placed randomly and at different heights above the floor level to increase the probability of obtaining results within the widest possible range of the moisture content and salinity values. This is due to the fact that usually the closer to the floor or ground level, the higher the mass moisture U m of the brick wall due to capillary action [e.g., 27,28]. Since sampling involves interference with the historic tissue of objects under conservation protection, the location of the measuring points should be agreed upon with the conservation services before the start of the testing.
The previous experience of the author of the publication shows that the number of research points n within the range of 200-300 is sufficient to obtain a satisfactory accuracy of machine learning models [22][23][24]. Therefore, bearing in mind that the number of material samples taken in one building on average ranges from 15 to 30 due to conservation restrictions, to build a data set with the desired cardinality, the number of buildings k should be from a few to a dozen or so.
In each of the n measuring points that were selected in the k = 1 building, the measurements should first be made using non-destructive dielectric and microwave methods with the use of mass-produced and widely available meters, e.g., Gann Uni 2 and Trotec T600. These methods are referred to as indirect, which means that moisture is not measured directly during the tests, but instead a different physical or chemical feature of the damp material is measured, the value of which is affected by the water contained in this material. Therefore, the dielectric method uses the phenomenon of changing the dielectric constant of the tested material due to moisture, whereas the microwave method measures the attenuation of microwaves passing through the moist material [15]. In both cases, the results of the measurements are indeterminate numbers that are read from the meter displays, which should be registered in the form of dimensionless parameters X D and X M . Subsequently, at the same n measuring points, samples of the material for testing in the laboratory should be taken using a low-speed drill. Bearing in mind that in a unit of wall volume, the brick material is about 80%, it is advisable to take samples from bricks. Performing all the n measurements and collecting all the n samples exhaust the scope of in situ testing for the k = 1 building.
Collected samples with a weight of about 30-50 g, sealed in airtight containers, should be delivered to the laboratory to determine their actual mass moisture U m using the gravimetric method. According to [29], the typical sizes of wall samples taken in the form of drill cuttings range from 50 to 100 g. However, according to the experience of the author of this publication, reducing the weight of the collected material to 30-50 g-which is particularly important in the case of historic buildings-does not adversely affect the obtained test results.
The collected samples should first be weighed with an accuracy of 0.1%, dried in a laboratory drier at 105 °C to a constant weight, and then reweighed [4]. Test results of the mass moisture content of the material collected in n test locations, expressed as a percentage and determined from the relationship where:m w mass of the sample with the actual moisture content [g],m s weight of the dried sample [g],which must be registered as the U m [%] parameter.
In the next step, the types and concentrations of the chloride, sulfate, and nitrate salts present in the collected wall samples should be determined using the semi-quantitative method with the use of strip tests. These salts are commonly present in brick walls, and get into the structure of a wall along with capillary water from the environment surrounding the buildings. As can be seen in papers [9,15], the presence of these salts affects the results of tests conducted using the dielectric method (to a greater extent) and the microwave method (to a lesser extent) by overestimating the measurement results.
For the purpose of the semi-quantitative tests, the previously dried material from the next n samples should be ground into a fine powder in a mortar, and then placed in a beaker (5 g of the crushed material and 50 ml of distilled water). After mixing it with the water, and waiting for the solid material to settle, the prepared solution should be filtered through a filter funnel. The obtained clear solution is that which is taken in the amount of about 5 g for subsequent determinations.
Determining the actual mass moisture content U m , as well as the types and concentrations of the chloride, sulfate, and nitrate salts that are present in all the n wall samples, exhausts the scope of laboratory tests for the k = 1 building. Therefore, it is possible to proceed to the tests in the k = n + 1 building.
After carrying out the tests in all the k buildings, the obtained results should be used to create a data set for assessing the mass moisture content U mc of saline brick walls in historic buildings using machine learning. The set will consist of n sets of results, which consist of parameters Y, X D , X M , U m , X C , X S , and X A .
To illustrate how the dataset (built by the author on the basis of both the first stage of the methodology described above and the research conducted in k = 12 buildings)  Table 1. However, all 290 sets of results are available in [24].

Description of stage II: generating the machine learning model
Stage II of the methodology, shown in the diagram in Fig. 4, includes the processes of learning, validation, and experimental verification of the selected machine learning algorithm to generate a model for assessing the moisture content of saline brick walls in historic buildings based on the data collected in stage I. The data set built in stage I should first be analyzed using, e.g., the Chauvenet's criterion, to detect and eliminate doubtful results. After rejecting outliers, and after performing statistical analyses, the dataset should be randomly divided into data for training, validation, and experimental verification in the following ratio: 70-80% of sets for the learning process, 10-15% for the validation process, and 10%-15% for the experimental verification process. Afterward, a machine learning algorithm should be selected.
In studies carried out to date, which concerned the usefulness of machine learning to assess the U mc mass moisture content of brick walls in historic buildings, a total of 11 different learning algorithms for artificial neural networks (ANN), the random forest algorithm (RF), and the support vector method (SVM) were analyzed. The algorithms were selected on the basis of literature concerning the application of machine learning in the field of civil engineering, which were conducted by Sun, Burton, and Huang, and published in paper [30]. Numerical analysis was carried out in two variants: in the first variant, the entire data set with mass moisture from 3 to 12% and more was analyzed, while in the second, the set was narrowed and included sets of results with mass moisture from 8% upwards. The full results of numerical work for these models and data sets were published in [23,24]. Table 2 lists the values of the parameters which evaluate the quality of the adjustment of the model to the training data and the accuracy of the mapping (the coefficient of determination R 2 , the mean absolute error MAE, and the root-mean-square error RMSE) obtained for the analyzed algorithms, if the subject of numerical analyses was a data set of results of the mass moisture content within a wide range of values (from 3 to 12% and more). For a more effective comparison between the models, the recently proposed for assessing the developed soft computing techniques reliability a20-index [31][32][33] is also given in the table. It shows the amount of samples that satisfy the predicted values with a deviation of ± 20%, compared to experimental values.
To choose the most effective algorithm for the identification of the mass moisture content, their usefulness was assessed using the ranking method. The conducted studies showed that if the subject of numerical analyses was a data set of results of the mass moisture content within a wide range of values (from 3 to 12% and more), the most predisposed to assess the moisture content of brick walls was the random forest algorithm with the number of decision trees equal to 500 [24]. In turn, when a narrowed set of data was subjected to numerical analyses, including sets of results with the mass moisture content from 8% upwards, the most predisposed for the neural non-destructive assessment of the moisture content in brick walls turned out to be the artificial unidirectional multi-layer neural network with backpropagation error, the Levenberg-Marquardt learning algorithm, and the 6-6-1 structure (a20-index = 0.75, R 2 = 0.803, MAE = 1.907, RMSE = 1.050) [23].
After the selection of the algorithm, it is taught, tested, and experimentally verified, the result of which is a machine learning model for predicting the U mc moisture content of saline brick walls in historic buildings.
To demonstrate the credibility and usefulness of the developed methodology in practice, it was used to quantitatively assess the moisture content of saline brick walls in a historic building, as described below.

Example of the application of the developed methodology in practice
The place in which the methodology was applied is the Golden Gate building in Gdańsk. This building is the work of the architect Abraham van den Blocke, and represents the Netherlandish Mannerism style. It was erected at the beginning of the seventeenth century, and is now considered to be one of the most splendid monuments of the Old Town of Gdańsk. It was entered into the register of monuments by the decision of the Provincial Conservator of Monuments in Gdańsk in February 1967. The Golden Gate is a two-story building. The ground floor serves as a gate and has three passages: the main one is located on the axis, and two side passages. The upper floor is used as an office. There is a room illuminated by eight large windows. The facades of the building have a rich cornice and column setting. Moreover, they are crowned with an attic in the form of a stone balustrade with figural sculptures made by Piotr Ringering. There is an unused basement under the building. Figure 5 shows a general view of the Golden Gate building, and a selected fragment of its basement.
Activities that aimed to quantitatively assess the moisture content of the brick walls of the Golden Gate building were   Algorithm's learning process Traning data Experimental verificaƟon of the algorithm TesƟng data A dataset of n result sets; each set contains 7 parameters: Y, X D , X M , U m , X C , X S , X A obtained during the tests carried out in stage I The data set includes sets of a wide range of results of the mass moisture content U m ranging from 3% to 12% and more

YES NO
Random forest algorithm with 500 decision trees UnidirecƟonal mulƟlayer arƟficial neural network with backpropagaƟon error, the Levenberg-Marquardt learning algorithm and a 6-6-1 structure for the data set that includes sets of a narrow range of results of the mass moisture content U m ≥ 8%    Scheme of the procedure that aims to quantitatively assess the moisture content of the brick walls of the Golden Gate building carried out in accordance with the methodology described in the article-according to the diagram in Fig. 6.
The tests were carried out in a total of 95 measuring points, where non-destructive measurements were made using dielectric and microwave methods, and samples of several grams were taken from the near-surface zone of the wall to determine the molar concentration of the chloride, sulfate, and nitrate salts. In addition, in 18 out of the 95 measuring points, samples of the wall weighing about 50 g were taken for moisture testing using the gravimetric method. This was approved by the Provincial Conservator of Monuments. The test results, in the form of 18 data sets, are presented in Table 3. Table 3 Exemplary sets containing parameters Y, X D , X M , X C , X S , and X A , which describe the input data for the artificial neural network Due to the fact that the image of the walls, as well as the results of the tests carried out using the gravimetric method, indicated the occurence of a very high moisture content of the walls, the taught, validated, and tested unidirectional multi-layer artificial neural network (with backpropagation error, the Levenberg-Marquardt learning algorithm, and the 6-6-1 structure, Fig. 7) was used to predict the mass moisture content U mc . Such an ANN was recommended in paper [23]. After entering data into the model in the form of parameters: Y, X D , X M , X C , X S , and X A , the network generated U mc values for all the n = 95 measuring points.
Verification of the accuracy of mapping by the artificial neural network of the mass moisture U mc of the wall was made by comparing 18 values generated by the network with 18 actual U m values obtained experimentally using the gravimetric method.
The results of these verifications are shown in Fig. 8 and Table 4. They indicate reliable identification of the validation data. This is evidenced by the location of the points along the regression line (which corresponds to the ideal mapping shown in Fig. 7), the obtained satisfactory value of the coefficient of determination R 2 equal to 0.7119, the obtained low median of the absolute error |ΔU m | equal to 1.30%, and the obtained (not as high as for in situ tests) median of the relative error |RE| amounting to 9.69%. It is also worth noting that the average value of the U mc moisture content identified by the ANN of 14.65% is equal to the average value of the U m moisture content that was obtained during the tests using the gravimetric method.

Summary
The article presents an original methodology for the quantitative assessment of the moisture content of saline brick walls in historic buildings with the use of machine learning. There is a lack of such a methodology in the literature. It was developed on the basis of the author's own experience, which was gained during moisture tests in many buildings erected in different historic periods, as well as during analyses carried out using artificial intelligence. The methodology consists of two stages. The first stage includes the carrying out of experimental and archival research in selected historic buildings to create a data set. The second stage includes the building of a machine learning model using the built set, random forest algorithms, and artificial neural networks, which were indicated on the basis of the conducted research and analysis.
The article was enriched with an example of the application of the developed methodology for the assessment of the moisture content of brick walls in the Golden Gate building in Gdańsk to prove its reliability and practical usefulness.  The values of the U mc moisture content, which were mapped for this building by an artificial neural network (with the Levenberg-Marquardt algorithm), are close to the actual U m values obtained experimentally using the gravimetric method. This is evidenced, among others, by the satisfactory value of the coefficient of determination R 2 equal to 0.7119, and the low median of the absolute error value of 1.30%. The obtained reliable results give hope for the possibility of the wider use in practice of the developed methodology for assessing the moisture content of saline brick walls in historic buildings. Researchers interested in its application can use a ready-made data set, which was built by the author of this article and included in paper [23], and also the data contained therein to teach a selected algorithm.

Funding Not applicable.
Data availability Data is contained within the article.

Declarations
Conflict of interest Author declares that she has no conflict of interest.
Ethical approval This article does not contain any studies with human participants or animals performed by any of the authors.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.