Application of Electrical Tomography Imaging Using Machine Learning Methods for the Monitoring of Flood Embankments Leaks

: This paper presents an application for the monitoring of leaks in ﬂood embankments by reconstructing images in electrical tomography using logistic regression machine learning methods with elastic net regularisation, PCA and wave preprocessing. The main advantage of this solution is to obtain a more accurate spatial conductivity distribution inside the studied object. The described method assumes a learning system consisting of multiple equations working in parallel, where each equation creates a single point in the output image. This enables the efﬁcient reconstruction of spatial images. The research focused on preparing, developing, and comparing algorithms and models for data analysis and reconstruction using a proprietary electrical tomography solution. A reliable measurement solution with sensors and machine learning methods makes it possible to analyse damage and leaks, leading to effective information and the eventual prevention of risks. The applied methods enable the improved resolution of the reconstructed images and the possibility to obtain them in real-time, which is their distinguishing feature compared to other methods. The use of electrical tomography in combination with speciﬁc methods for image reconstruction allows for an accurate spatial assessment of leaks and damage to dikes.


Introduction
Floods cause enormous damage, and are the cause of many tragedies. Therefore, the monitoring of flood defences is important for the safety of people and the environment. However, the methods used to identify cracks and seepage in dikes visually are insufficient. A dedicated monitoring system should be able to test dikes for seepage.
There are several methods which are used to analyze flood embankments. Table 1 shows the main advantages and disadvantages of each method. Geophysical methods are used in environmental studies to image objects [1]. They are characterized by their non-invasive character and the possibility of rapid imaging in soil. The GPR radar method is based on the waves passing through the object and allowing the analysis of their propagation through the analysis of the reflected signal, by which changes in the structure of the investigated medium can be observed [2]. Another method is thermography, which uses the phenomenon of the non-contact detection of electromagnetic radiation in the mid-infrared band. By analizing thermal images at different time intervals, changes in flood weights can be detected [3]. Another type of method is based on the analysis of The Electrical Impedance Tomography (EIT) method enables the analysis of cracks and seepage [13] by taking measurements reconstructing them appropriately in the form of an image [14][15][16][17]. The monitoring of dikes, levees, dams, and floodwalls is a key process affecting the maintenance and reliability of these structures due to catastrophic effects and high possible damage costs [18]. The continuous and multi-level control of the technical condition of embankments is costly. Therefore, there is a great need to replace traditional observation methods with cyber-physical systems, in which impedance tomography (EIT) plays a key role [18][19][20][21]. The disadvantage of the commonly used solutions is the point  [22]. The most common cause of damage to shafts is water that penetrates through seepage and leaks. With the EIT implemented in cyber-physical monitoring systems, it is possible to obtain a cross-sectional view of the dike interior [23,24]. The image quality and resolution are sufficient to detect water-penetrated areas [25]. Early information about hazards helps to prevent severe damage. Despite significant advances in dike design and construction, unexpected events may occur. Therefore, designing an economical and reliable device to monitor the condition of dikes or flood-control reservoirs is crucial to prevent the devastating effects of flooding.
In tomographic systems, the image quality and its parameters-model geometry, spatial resolution, number of sensors, discretization, and reconstruction method-are important factors. Different deterministic and machine learning methods are used to solve inverse problems depending on the tomographic technique used. The goal of these methods is to obtain the expected solution quickly and with a good image reconstruction quality. Electrical impedance tomography has a relatively low image resolution. However, in the developed methods, the resolution is sufficient for seepage analysis or shaft condition monitoring.
The motivation for the research was to develop a distributed system to analyze dikes by spatially analyzing their condition in real-time. The main objective was to develop a comprehensive solution consisting of a measurement device, measurement electrodes, algorithms to reconstruct images from measurement data, and a cyber-physical system to monitor the dike condition. The solution based on electrical impedance tomography was chosen because of the possibility of the area analysis of the tested object using measurements on the near-surface of the tested object, the method of data acquisition, and the possibility of the analysis of changes in the values of electrical parameters. Besides this, electrical impedance tomography is quite sensitive to cracks and seepage, which undoubtedly makes it effective in shaft monitoring.
The authors' main contribution is the development of a solution based on machine learning algorithms that work individually for each pixel of a tomographic image. The primary goal was to increase the resolution of the image reconstruction an-d enhance the system's ability to identify different kinds of anomalies within flood embankments. The system architecture is shown in Figure 1. The data are collected from the tomographic equipment and then sent to the analysis software system. Energies 2021, 14, x FOR PEER REVIEW 3 Electrical Resistance Tomography device Ability to analyze 2D/3D parts of the shaft with the ERT device. Non-invasive.
Using only built-in measurement a reconstruction methods. Unit measurements.
Distributed electrical impedance tomography system Area ability analyze any portion of the levee or all of it through a distributed cyber-physical system. Continuous monitoring. Non-invasive.
High costs.
In tomographic systems, the image quality and its parameters-model geome spatial resolution, number of sensors, discretization, and reconstruction method-are portant factors. Different deterministic and machine learning methods are used to so inverse problems depending on the tomographic technique used. The goal of these me ods is to obtain the expected solution quickly and with a good image reconstruction qu ity. Electrical impedance tomography has a relatively low image resolution. However the developed methods, the resolution is sufficient for seepage analysis or shaft condit monitoring.
The motivation for the research was to develop a distributed system to analyze di by spatially analyzing their condition in real-time. The main objective was to develo comprehensive solution consisting of a measurement device, measurement electrodes gorithms to reconstruct images from measurement data, and a cyber-physical system monitor the dike condition. The solution based on electrical impedance tomography w chosen because of the possibility of the area analysis of the tested object using measu ments on the near-surface of the tested object, the method of data acquisition, and possibility of the analysis of changes in the values of electrical parameters. Besides t electrical impedance tomography is quite sensitive to cracks and seepage, which undou edly makes it effective in shaft monitoring.
The authors' main contribution is the development of a solution based on mach learning algorithms that work individually for each pixel of a tomographic image. primary goal was to increase the resolution of the image reconstruction an-d enhance system's ability to identify different kinds of anomalies within flood embankments. system architecture is shown in Figure 1. The data are collected from the tomograp equipment and then sent to the analysis software system.   The subject of the application of logistic regression with an elastic net regularisation [26], principal components analysis (PCA) [27] and wavelet preprocessing [28] in electrical impedance tomography [29,30] has been undertaken to verify and test the extent to which this approach can be helpful in the study of EIT dikes. For this purpose, numerical models and real models with different variations of electrode placement were prepared. Furthermore, the measurements from the tomograph were used to reconstruct the image of the object's interior by collecting and analysing the data using machine learning methods.
The paper is divided into five sections, with an introduction. The architecture of the designed system is presented in Section 2. It also describes the measurement device, laboratory measurements, numerical models and machine learning algorithms. The work results obtained by reconstructing the corresponding images for the synthetic and measurement data are presented in Section 3. Section 4 discusses the results obtained, while Section 5 summarises the research carried out.

Materials and Methods
The following section presents electrical tomography's structure and measurements, elements, apparatus, image reconstruction models from simulated and real measurements, and mathematical algorithms. In addition, the data collection methods and measurement methods are presented. The data are used in the next step to solve progressive and inverse problems. In the following subsections, several algorithms that were used in this work are described. These are wavelet-preprocessing, elastic net, and PCA algorithms. The above algorithms were used for tomographic imaging, and finally, they were compared. The above methods were used to obtain rapid and efficient solutions to build models on the reconstructed areas. The work was performed using tomographic equipment designed and manufactured at Netrix SA Research and Development Center. Additionally, Matlab, Python in R language and Eidors packages and tools were used [31].

Electrical Tomography
Electrical impedance tomography [32,33], generally called electrical tomography (ET) [34,35], includes some image reconstruction techniques. The methods available in the literature are electrical resistance tomography (ERT) [36,37], electrical capacitance tomography (ECT) [38][39][40][41] and electrical impedance tomography. ECT is based on the reconstruction of the electrical permeability ε, whereas EIT is based on the reconstruction of the conductivity γ. It is worth noting that electrical tomography has a low image resolution. This is caused by the limited number of current flow measurements through the test piece and the low sensitivity of the measured voltages, which depends on the conductivity change inside the test piece. In EIT, the current or voltage is introduced into an object through a set of sensors attached to its surface. The voltage drop values are measured on the other sensors. The properties of the test object are reconstructed by solving the inverse problem. Using the electrical properties of the materials, the interior of the test object can be mapped. Impedance tomography uses the conductivity of objects; by connecting a current or voltage source, a current flow or voltage distribution is forced. The current or voltage is observed to flow at the edge of the test area. The data collected in this way are used to build images using reconstruction algorithms. The image thus prepared is called a tomogram.

Measurement System
The system collects measurement data from the electrodes through a tomographic device that allows the measurement of up to 32 channels. The entire infrastructure is centrally managed for data collection and measurement recording. The application enables measurement collection, data management and device monitoring. A finite element model and a real measurement model were prepared to test the effectiveness of different algorithms for the analysis of the procedures in tomography. In turn, electrical impedance tomography was used for the analysis.   The experiments were conducted on two measurement models. The first model (Figure 4) uses an array of 16 measurement electrodes equally spaced along the profile line, and a measurement array with 32 electrodes evenly spaced in two rows. In contrast, the second model consists of two multi-sensor arrays with 32 measuring electrodes ( Figure  5). The EIT's task is to generate an electrical current with specific parameters for each pair of sensors, read the voltage between each electrode, and send the data to the output. The flood embankment models were designed to represent the key parameters of the existing Analog multiplexer Amplifier  The excitation signal source was built on a direct digital synthesis (DDS) signal generator coupled with a current-generation system. The signal prepared in this way is then sent to the inputs of the multiplexer system, where-depending on the sequence of current measurements-it is transmitted to the selected output. The measurement controller performs the control of the currently measured/selected item. The measuring block consists of a set of active filters minimising the influence of the 50 Hz components on the measurement accuracy. The prepared signal travels to the digitally controlled gain control system, and to the Analog-to-Digital Converter (ADC). Each correct measurement of the matrix is sent to the control system, which, depending on the selected configuration, performs the process of recording or sending data to the server. Thanks to the integrated measuring circuit (capacitance/impedance), the device can be used to perform both EIT (impedance) and ECT (capacitance) measurements. The device is designed to work with sets of 8, 16 and 32 electrodes. The measurement takes place sequentially, depending on the selected mode. Two modes of EIT measurement are available (polar Ground GNDmeasurement against the negative electrode; polar NB-differential measurement). In the case of ECT measurements, only one mode is available: interelectrode measurement. In addition to mode selection, the instrument allows the user to choose the results' averaging level and select the gain parameters. A 2.4-inch graphic touch screen is used to operate the instrument, select the functions and start the measurement process. The instrument enables the storage of the data on a portable memory carrier (pen drive), and allows the user to stream it via a serial port or the Ethernet.
The experiments were conducted on two measurement models. The first model ( Figure 4) uses an array of 16 measurement electrodes equally spaced along the profile line, and a measurement array with 32 electrodes evenly spaced in two rows. In contrast, the second model consists of two multi-sensor arrays with 32 measuring electrodes ( Figure 5). The EIT's task is to generate an electrical current with specific parameters for each pair of sensors, read the voltage between each electrode, and send the data to the output. The flood embankment models were designed to represent the key parameters of the existing facility as accurately as possible.
(c) (d) The experiments were conducted on two measurement ure 4) uses an array of 16 measurement electrodes equally and a measurement array with 32 electrodes evenly spaced second model consists of two multi-sensor arrays with 32 m 5). The EIT's task is to generate an electrical current with spe of sensors, read the voltage between each electrode, and sen flood embankment models were designed to represent the k facility as accurately as possible.

Algorithms and Methods
Many deterministic, statistical, or computational intelligence methods solve optimisation tasks [42][43][44][45]. In this paper, the authors concentrate on the use of machine learning. In addition to the real models, the imaging domain had to be prepared as a composite finite-element mesh model. In this case, a model was created for each element, representing the relationship between the value of the signal coming from the electrodes and the conductivity. If a different conductivity comes out of the measurements than that in the background measurements, there is a water concentration in the area. With the above information and measured values, the location of the flooded embankment can be determined. Therefore, a model is defined for each finite element. This allows the calculation of the probability of conductivity that differs from the background conductivity for each finite element. Based on this, the resolution in the imaging domain was determined, and thus, the mesh was reconstructed. The resolution of the imaging domain closely depends on the classification level, and it is the classification level that determines the occurrence of conductivity which is different from the background conductivity. By performing ROC analysis [46,47], each finite element's classification level was determined, which should be understood here as the limiting probability of percolating conductivity.

Logistic Regression
Knowing the model and the background measurement, we need to answer the question of which finite elements in the area belong to the background and which belong to the inclusions. If the answer to this question is already known, the reconstruction in the EIT [48] can be created. For this purpose, a logistic regression model is defined for each finite element. One defines the probability space as ( , ℱ, ) and defines a random variable Y with a discrete distribution for a finite element where : → {0, 1}. Then, it can be concluded that, in the presented approach, while the finite element belongs to the inclusions (increased humidity), it is assumed that the realisation of the random variable Y is

Algorithms and Methods
Many deterministic, statistical, or computational intelligence methods solve optimisation tasks [42][43][44][45]. In this paper, the authors concentrate on the use of machine learning. In addition to the real models, the imaging domain had to be prepared as a composite finiteelement mesh model. In this case, a model was created for each element, representing the relationship between the value of the signal coming from the electrodes and the conductivity. If a different conductivity comes out of the measurements than that in the background measurements, there is a water concentration in the area. With the above information and measured values, the location of the flooded embankment can be determined. Therefore, a model is defined for each finite element. This allows the calculation of the probability of conductivity that differs from the background conductivity for each finite element. Based on this, the resolution in the imaging domain was determined, and thus, the mesh was reconstructed. The resolution of the imaging domain closely depends on the classification level, and it is the classification level that determines the occurrence of conductivity which is different from the background conductivity. By performing ROC analysis [46,47], each finite element's classification level was determined, which should be understood here as the limiting probability of percolating conductivity.

Logistic Regression
Knowing the model and the background measurement, we need to answer the question of which finite elements in the area belong to the background and which belong to the inclusions. If the answer to this question is already known, the reconstruction in the EIT [48] can be created. For this purpose, a logistic regression model is defined for each finite element. One defines the probability space as (Ω, F , P) and defines a random variable Y with a discrete distribution for a finite element where Y : Ω → {0, 1} . Then, it can be concluded that, in the presented approach, while the finite element belongs to the inclusions (increased humidity), it is assumed that the realisation of the random variable Y is one; otherwise, it is zero. Based on the X ∈ R m the signal from the sensors, it is determined whether the element belongs to the inclusions. For this purpose, one needs to define a classifier f : R m → {0, 1} ). A classifier in the present work was logistic regression. The logistic regression model is used to estimate the binomial (or polynomial) distribution of the response variable Y based on the realisations of the input variables X ∈ R m ; that is, we determine P(Y = y|X), where y ∈ {0, 1}, when P(Y = y|X) is the probability of success and P(Y = 0|X) is the probability of failure. We should mention the odds, which are the ratio of success to failure, and are calculated as follows: The main aim of logistic regression [49][50][51] consists in the estimation of the success probability P(Y = 1|X ) based on the observation of vector of input variable X. Because P(Y = 1|X ) ∈ (0, 1), from Equation (1) we know that the odds θ(X) ∈ (0, ∞), but ln θ(X) ∈ (−∞, ∞). In logistic regression, the linear relationship between the logit and the vector of input variable X is analysed as follows: where ε is a random variable with normal distribution N 0, σ 2 , and β 0 ∈ R and β = (β 1 , β 2 , . . . , β m ) ∈ R m denote the model parameters. From (2) we know the success probability: In order to determine the unknown parameters β 0 and β in (2), we use the Maximum Likelihood Estimation (MLE) method (i.e., we estimate the parameters by the method of maximum likelihood). Let D = (X, Y) : X ∈ R n×m , Y ∈ {0, 1} n be a dataset: x (1) x (2) . . .
where y i ∈ {0, 1} and x (i) ∈ R m denote the realisations of the response and input variables for the i−th observation, 1 ≤ i ≤ n.
In order to estimate the parameters β 0 and β in logistic regression (2), we solve the following equation: max where the objective function L(β 0 , β, Y, X) is a likelihood defined as Instead of task (5), we solve the auxiliary task: where the logarithm of the objective function (7) is equal to The Newton-Raphson algorithm was used to solve the auxiliary task (5) and to estimate the parameters β 0 and β. The viewing area consists of k ∈ N finite elements. A logistic regression model (3) is determined for each finite element. The obtained signal X ∈ R m from the electrodes is used to estimate the probability of inclusion P j (Y = 1|X) for j− finite element, 1 ≤ j ≤ k. The reconstruction of the viewing area is defined as a sequence ẑ j 1≤j≤k , where for cutting level l ∈ (0, 1).
For the proper recognition of the visual area, coefficients describing the quality of the area recognition must be provided. For this purpose, it is assumed that a finite element that does not belong to the inclusions is described as a negative case (N); observing the problem at hand, this should be interpreted as a ground. On the other hand, if a finite element belongs to the inclusions and is in the inclusion area, this is taken as the positive case (P).
The confusion matrix is determined in the following way: TP (True Positive) denotes the finite elements that correctly belong to the inclusion area, TN (True Neg-ative) denotes the number of finite elements that are properly recognized as belonging to the background, FP (False Positive) denotes the number of finite elements belonging to the background that are recognized as having belonged to the inclusion area (false alarm), and FN (False Negative) denotes the number of finite elements belonging to the inclusion area but recognized as background ( Table 2). For each finite element, from the readings X, we determine the inclusion probability P(Y = 1|X) according to Equation (3) and assume for the level l ∈ (0, 1).
The quality of image reconstruction (finding inclusions in the field of view) based on a classifier by logistic regression (3) is estimated by ratios [46,47]. The based ratios (coefficients) are determined as follows: The accuracy represents the part of the visual area that the model correctly recognises. Note that this is only one possible measure that represents the correctness of the recognition.

Elastic Net
Signals derived from EIT tomography electrodes can be collinear signals. Because such collinear variables may appear, the Elasticnet method for logistic regression was applied [26]. A possible regularisation method is an elastic net, defined as a linear mixture of a Selection Operator (LASSO), Least Absolute Shrinkage and ridge regression, which is called Tikhonov regularisation [52,53]. Instead of the solution of classical task (5), which is connected with an estimation of unknown parameters in the logistic regression model, we optimise the objective function (6) whilst taking the penalty into account. In order to do this, we need to solve the following equation: where λ > 0 denotes the regularisation ratio, and 0 ≤ α ≤ 1, and P α denotes the penalty, as follows: The penalty P α (β) is the combination of the linear norm of the parameter β in L 1 and L 2 spaces. For α = 0 we have ridge regression, whereas for α = 1 we have LASSO regularisation.

Principal Components Analysis
Principal Component Analysis involves identifying factors (components) present in a dataset X, [49,54]. This contains n observations for m variables. The aim of PCA is to rotate a coordinate solution in such a way as to maximise the variability of the first coordinate, followed by the variability of the next coordinate, and so on. The coordinates of the new system are called the charges of the generated principal components. In the new space, most of the variability is explained by the initial factors. PCA is frequently applied to reduce size of a dataset of statistics by discarding recent factors [50].
The decomposition of an X matrix is by Singular Value Decomposition. Thus, any real matrix X may be represented as where U ∈ R n×m is the left orthogonal matrix of left singular vectors, D ∈ R m×m is the diagonal matrix containing the singular values, and V ∈ R m×m is the right orthogonal vector matrix (matrix of right singular vectors). The orthogonal matrix V satisfies the property V T = V −1 . The decomposition of a given matrix X may be shown as where T = UD denotes coordinates, and V = P denotes charges. A coordinate matrix T is determined by the multiplication of both sides (in a new space) of the equation X = TP T by P, obtaining XP = TP T P = T According to the expansion (13), we find the weights that are used in the linear combination in the column V of the matrix to form the new dimensions. This formula expresses the variance of the coordinates in the new space: where d i and 0 ≤ i ≤ k are the singular values from the diagonal of matrix D. The part of the variance explained by the i-th principal component is λ i , while the amount of variance that is explained by k principal components is Note that in EIT, for each case, the electrode readout including polarisation and projection angles x (j) ∈ R m (according to (13)) corresponds to the value of x (j) P in the new space. The logistic regression of the form (2) is determined for individual finite elements, except that we analyse the linear dependence of the chance logarithm on a value in the new coordinates ln θ(S) = Tβ + ε.

Discrete Wavelet Transformation (DWT)
Another method to reduce the amount of data that is redundant is to determine the projection of the signal {x t } 1≤tleqm obtained from the electrodes to an orthogonal basis named as the mother wavelet. By definition, Ψ(t) will be an orthogonal wavelet basis. For j ∈ Z, the sequence is defined as and φ jk k∈Z where φ(t) denotes the scaling function which corresponds to the parent wavelet Ψ. In this case, the time series {x t } 1≤tleqm can be represented as where the value c jk is the scaling factor, but d ik is the specific coefficient. Sequence {x t } 1≤tleqm can be expressed in a different form from the level of decomposition j ∈ Z based on Equation (17). The functions Ψ jk (t) and φ jk (t) take values which are different from zero on a bounded interval. It follows that the sequence {x t } 1≤t≤m can be presented as follows: where s << m. According to [28], a projection operator for a time series is defined as {x t } 1≤t≤m at level j on an orthogonal basis φ jk (t) 0≤k≤s , as follows: Much information on DWT can be read in [28,55,56]. The EIT for the sequence of scaling factors from the projection (26) was used as the input variables for the logistic regression. There are different types of wavelet, e.g., Daubechies . Some results are presented in the next section.
To analyse this, we used Daubechies1 decomposition, which is also known as a Haar wavelet. The mother wavelet is defined as follows: but corresponding to her, the father wavelet is defined as follows: From (15) and (16), we see that the coefficients Ψ jk (t) and φ jk (t) have different-fromzero values at the interval 2 j k, 2 j (k + 1) .

Algorithm Implementation
In the classical inverse problem in EIT, we determine the conductivity of each finite element located in the viewing area. Our approach was to determine the inclusions with high probability areas; logistic regression was used for this purpose. The main problem in EIT is the problem of the co-liveness of features (measurements from electrodes). It is impossible to extract a set of stochastically independent features. In order to improve the quality of the classifier, the following techniques were additionally applied: elastic net regularization, principal component analysis and wavelet preprocessing. In this paper, however, only one type of wavelet was used, analyzing the accuracy and AUC curves. This technique is more robust to perturbations of the measurements from the electrodes. Figure  6 shows the learning process of the algorithm, while Figure 7 shows the reconstruction process using machine learning methods. From (15) and (16), we see that the coefficients ( ) and ( ) have differentfrom-zero values at the interval 2 , 2 ( + 1)).

Algorithm Implementation
In the classical inverse problem in EIT, we determine the conductivity of each finite element located in the viewing area. Our approach was to determine the inclusions with high probability areas; logistic regression was used for this purpose. The main problem in EIT is the problem of the co-liveness of features (measurements from electrodes). It is impossible to extract a set of stochastically independent features. In order to improve the quality of the classifier, the following techniques were additionally applied: elastic net regularization, principal component analysis and wavelet preprocessing. In this paper, however, only one type of wavelet was used, analyzing the accuracy and AUC curves. This technique is more robust to perturbations of the measurements from the electrodes. Figure 6 shows the learning process of the algorithm, while Figure 7 shows the reconstruction process using machine learning methods.

Results
This chapter presents water leakage results from dikes based on the built numerical models and laboratory measurements. Three models of tomographic image reconstruction systems were developed. The results of the presented solutions are presented in this chapter. The inverse and ill-posed problems of electrical tomography are related to the insufficient number of function arguments (measurements/inputs) compared to the required number of outputs (image pixels).
The presented research aims to generate a spatial image of the moisture with a specific pixel resolution from the measurements. Single models are trained with all of the measurement values as the input and only a one-pixel value as the output in order to simplify the generation of multi-pixel images. Therefore, the algorithm must generate as many models as there are pixels in the image. When learning the predictive models, each model obtains different coefficients and hyperparameters that determine the ways in which the input values are transformed to the output. Energies 2021, 14, x FOR PEER REVIEW 1 From (15) and (16), we see that the coefficients ( ) and ( ) have diff from-zero values at the interval 2 , 2 ( + 1)).

Algorithm Implementation
In the classical inverse problem in EIT, we determine the conductivity of each element located in the viewing area. Our approach was to determine the inclusions high probability areas; logistic regression was used for this purpose. The main probl EIT is the problem of the co-liveness of features (measurements from electrodes). It possible to extract a set of stochastically independent features. In order to improv quality of the classifier, the following techniques were additionally applied: elast regularization, principal component analysis and wavelet preprocessing. In this p however, only one type of wavelet was used, analyzing the accuracy and AUC cu This technique is more robust to perturbations of the measurements from the electr Figure 6 shows the learning process of the algorithm, while Figure 7 shows the recon tion process using machine learning methods.

Results
This chapter presents water leakage results from dikes based on the built num models and laboratory measurements. Three models of tomographic image recon tion systems were developed. The results of the presented solutions are presented i chapter. The inverse and ill-posed problems of electrical tomography are related insufficient number of function arguments (measurements/inputs) compared to t quired number of outputs (image pixels).
The presented research aims to generate a spatial image of the moisture with cific pixel resolution from the measurements. Single models are trained with all measurement values as the input and only a one-pixel value as the output in ord simplify the generation of multi-pixel images. Therefore, the algorithm must gener many models as there are pixels in the image. When learning the predictive models model obtains different coefficients and hyperparameters that determine the wa which the input values are transformed to the output.

Results
This chapter presents water leakage results from dikes based on the built numerical models and laboratory measurements. Three models of tomographic image reconstruction systems were developed. The results of the presented solutions are presented in this chapter. The inverse and ill-posed problems of electrical tomography are related to the insufficient number of function arguments (measurements/inputs) compared to the required number of outputs (image pixels).
The presented research aims to generate a spatial image of the moisture with a specific pixel resolution from the measurements. Single models are trained with all of the measurement values as the input and only a one-pixel value as the output in order to simplify the generation of multi-pixel images. Therefore, the algorithm must generate as many models as there are pixels in the image. When learning the predictive models, each model obtains different coefficients and hyperparameters that determine the ways in which the input values are transformed to the output.
In the models presented below for each finite element, we determined the model of logistic regression. The measurements obtained from the electrodes are collinear. Thus, the direct application of logistic regression implies that the absolute values of the structural parameters of regression are quite large, and the prediction is poor. Therefore, three approaches were applied to overcome the collinearity problem of the input variables: (1) elastic net regularisation, (2) the estimation of the principal component measurements (PCA application) as input variables in the regression model, (3) the projection of the measurements obtained from the electrodes based on wavelet decomposition at level 4. In the models presented below for each finite element, we determined the model of logistic regression. The measurements obtained from the electrodes are collinear. Thus, the direct application of logistic regression implies that the absolute values of the structural parameters of regression are quite large, and the prediction is poor. Therefore, three approaches were applied to overcome the collinearity problem of the input variables: (1) elastic net regularisation, (2) the estimation of the principal component measurements (PCA application) as input variables in the regression model, (3) the projection of the measurements obtained from the electrodes based on wavelet decomposition at level 4.    In the models presented below for each finite element, we determined the model of logistic regression. The measurements obtained from the electrodes are collinear. Thus, the direct application of logistic regression implies that the absolute values of the structural parameters of regression are quite large, and the prediction is poor. Therefore, three approaches were applied to overcome the collinearity problem of the input variables: (1) elastic net regularisation, (2) the estimation of the principal component measurements (PCA application) as input variables in the regression model, (3) the projection of the measurements obtained from the electrodes based on wavelet decomposition at level 4.                  The analysis of the reconstruction's accuracy to the disturbances arising in the measurement obtained from the electrodes signals using the method mentioned above will be presented in Figure 15. For this purpose, instead, for a reconstruction based on signal x ∈ R m we analysed the reconstruction based on a disturbed signal x + σε, where σ ≥ 0 and ε : Ω → R m is a sequence of independent identically distributed random variables with normal distribution N(0, 1). The figure below shows the relationship between the accuracy and AUC (area under the curve) depending on the value σ (standard deviation of disturbances).      In order to verify the performed numerical tests, a laboratory model of the flood embankment was prepared (shown in Figure 16), which was flooded with water. The image reconstruction results for the machine learning methods are shown in  ergies 2021, 14, x FOR PEER REVIEW In order to verify the performed numerical tests, a laboratory m bankment was prepared (shown in Figure 16), which was flooded w reconstruction results for the machine learning methods are shown i      Figure 21 shows a numerical model of a dike with electrodes placed on its surface in one row. Model I consists of 32 electrodes, 2818 nodes, 9805 finite elements and point                                 Figure 33 shows a numerical model of a dike with electrodes placed on its surface in one row. Model I consists of 2 × 16 electrodes, 3844 nodes, 16,240 finite elements and multisensors. Figures 34-39 summary the image reconstruction for Model III. Three image reconstruction models were tested, and are shown in Figures 34, 36, and 38, with different variations of water infiltration. The data in Tables 9-11 show the results of the exact re-  Figure 33 shows a numerical model of a dike with electrodes placed on its surface in one row. Model I consists of 2 × 16 electrodes, 3844 nodes, 16,240 finite elements and multisensors. Figures 34-39 summary the image reconstruction for Model III. Three image reconstruction models were tested, and are shown in Figures 34, 36, and 38, with different                   The analysis of the accuracy of the reconstruction of the disturbances arising in the measurement obtained from the signals of the depth sensors is shown in Figure 38.

Image Reconstruction for Model III
In order to verify the numerical studies performed, a laboratory model with depth sensors was constructed ( Figure 39). Then, the object was flooded with water. The image reconstruction results for machine learning methods are shown in Figure 40. Laboratory model with depth sensors for 32 measuring electrodes and the reconstruction based on real measurements were presented in Figures 41 and 42.

Discussion
This paper presented a monitoring system for flood embankments, and measurement models for water leakage were prepared. The designed models were equipped with different variants of sensors. In the first two models, point electrodes were used, while in the third model, multi-sensor electrodes were prepared. This solution directly measures specific electrical quantities and their corresponding analysis in the monitoring and damaging of flood embankments. Furthermore, machine learning algorithms were used and appropriately implemented for image reconstruction. Moreover, this is a novel approach in the application of machine learning algorithms, as other methods cannot estimate seepage in the entire volume of the object.
In this study, three flood embankment models with point and multi-sensor electrodes were implemented. The different sensors were evenly distributed along the edge of the object and inside it, depending on the model tested and the number of electrodes applied. The image reconstruction results show the great potential of the proposed solution for leakage analysis. Logistic regression with an elastic net, logistic regression with PCA, and wavelet decomposition methods solved the inverse problem. Furthermore, the solution presented works very quickly (reconstruction takes fractions of a second) and with high accuracy.
The main objectives of the research were to improve the resolution of the reconstructed image and increase the sensitivity of the monitoring system to changes occurring inside the floodbank. Thus, knowing the voltage values, the conductivity of the soil between the electrodes can be calculated. A separate algorithm generates each point of the output image. Due to the volume of data and equations to learn, the implementation of the assumptions required cloud computing. It is worth noting that the primary goal of EIT tomography is not to perfectly estimate the conductivity of the finite elements defined on the section mesh. The real goal is a faithful and accurate representation of the interior of

Discussion
This paper presented a monitoring system for flood embankments, and measurement models for water leakage were prepared. The designed models were equipped with different variants of sensors. In the first two models, point electrodes were used, while in the third model, multi-sensor electrodes were prepared. This solution directly measures specific electrical quantities and their corresponding analysis in the monitoring and damaging of flood embankments. Furthermore, machine learning algorithms were used and appropriately implemented for image reconstruction. Moreover, this is a novel approach in the application of machine learning algorithms, as other methods cannot estimate seepage in the entire volume of the object.
In this study, three flood embankment models with point and multi-sensor electrodes were implemented. The different sensors were evenly distributed along the edge of the object and inside it, depending on the model tested and the number of electrodes applied. The image reconstruction results show the great potential of the proposed solution for leakage analysis. Logistic regression with an elastic net, logistic regression with PCA, and wavelet decomposition methods solved the inverse problem. Furthermore, the solution presented works very quickly (reconstruction takes fractions of a second) and with high accuracy.
The main objectives of the research were to improve the resolution of the reconstructed image and increase the sensitivity of the monitoring system to changes occurring inside the floodbank. Thus, knowing the voltage values, the conductivity of the soil between the electrodes can be calculated. A separate algorithm generates each point of the output image. Due to the volume of data and equations to learn, the implementation of the assumptions required cloud computing. It is worth noting that the primary goal of EIT tomography is not to perfectly estimate the conductivity of the finite elements defined on the section mesh. The real goal is a faithful and accurate representation of the interior of the test object. Thus, it does not matter if the colours in the drawing correspond to the actual conductivity of the finite elements hidden inside the dike. However, it is important that the inclusions can be identified, regardless of their number, shape, and location.
By analysing Tables 3-11, it can be observed that the images obtained represent the models and examples studied with high accuracy. From the tables, one can read the error values of the reconstructed images relative to their models. It can be noticed that the majority of the pixels on the mesh do not include any errors. The comparative analysis of the three studied methods in the image reconstruction shows the high accuracy of each algorithm. Depending on the model and example studied, each method proves more or less accurate.
For the model shown in Figure 43, the correlation between the 96 features was determined (the signal contains 96 measurements between the electrodes). As we look at the heat map for these 96 features, we see that they are correlated.   On the other hand, by performing a PCA analysis (see Figure 44 and Table 12), we can see that five principal components explain 95% of the variation in the traits, and 10 principal components explain 98.6% of the variation in the traits. In Figure 44, we see an exponential relationship between the contribu planation of feature variance and the principal component number. The u net shows that the finite element conductivity is best explained by meas from the electrodes closest to the finite element. Reconstructions obtained regression with an elastic net, PCA decomposition, and wavelet preprocess  In Figure 44, we see an exponential relationship between the contribution to the explanation of feature variance and the principal component number. The use of an elastic net shows that the finite element conductivity is best explained by measurements read from the electrodes closest to the finite element. Reconstructions obtained using logistic regression with an elastic net, PCA decomposition, and wavelet preprocessing were compared with results obtained using deterministic methods involving the variance reduction of regression models, such as total variation and Tikhonov regularization. The values obtained by logistic regression are in the interval [0, 1], so additionally, a linear transformation was performed where the value "0" corresponds to the reference value of the conductivity, while the value "1" corresponds to the inclusion conductivity. Figure 45 shows the pattern and reconstruction results. In Figure 44, we see an exponential relationship between the contribution to the explanation of feature variance and the principal component number. The use of an elastic net shows that the finite element conductivity is best explained by measurements read from the electrodes closest to the finite element. Reconstructions obtained using logistic regression with an elastic net, PCA decomposition, and wavelet preprocessing were compared with results obtained using deterministic methods involving the variance reduction of regression models, such as total variation and Tikhonov regularization. The values obtained by logistic regression are in the interval [0, 1], so additionally, a linear transformation was performed where the value "0" corresponds to the reference value of the conductivity, while the value "1" corresponds to the inclusion conductivity. Figure 45 shows the pattern and reconstruction results. The following measures were used to compare the reconstruction results with the standard: the total sum of squares (TSS), mean squared error (MSE), mean absolute error The following measures were used to compare the reconstruction results with the standard: the total sum of squares (TSS), mean squared error (MSE), mean absolute error (MAE) and mean absolute percentage error (MAPE). The results of the comparisons are presented in the table below (Table 13). For the model presented here, the use of logistic regression techniques improved the quality of the reconstruction. By comparing the results from the table, we can see that for the logistic regression models, the mean square error (MSE) for each finite element does not exceed 0.05, while in the case of the use of Tikhonov regularization alone, this error is almost 30 times higher, and in the case of the total variation technique it is almost eight times higher. By comparing the MAE and MAPE (mean absolute error and mean percentage error), we can see that they are several times smaller than for the Tikhonov regularization and the total variation for logistic regression. The results of the comparisons are shown in the table below ( Figure 46).
(MAE) and mean absolute percentage error (MAPE). The results of the comparisons are presented in the table below (Table 13). For the model presented here, the use of logistic regression techniques improved the quality of the reconstruction. By comparing the results from the table, we can see that for the logistic regression models, the mean square error (MSE) for each finite element does not exceed 0.05, while in the case of the use of Tikhonov regularization alone, this error is almost 30 times higher, and in the case of the total variation technique it is almost eight times higher. By comparing the MAE and MAPE (mean absolute error and mean percentage error), we can see that they are several times smaller than for the Tikhonov regularization and the total variation for logistic regression. The results of the comparisons are shown in the table below ( Figure 46). For the shaft model (where the electrodes are placed only on one side of the viewing objection), by comparing the results from the table, we can see that the quality of reconstructions obtained by logistic regression with PCA and wavelet, and by total variation are quite good. In contrast, the reconstructions by logistic regression with an elastic net and by Tikhonov regularization are slightly worse. Furthermore, for the case of logistic regression with PCA, the mean absolute error (MAE) is even lower than for total variation, while the mean squared error (MSE) and mean percentage error (MAPE) for the total variation technique is smaller than that for logistic regression with PCA (Table 14).  For the shaft model (where the electrodes are placed only on one side of the viewing objection), by comparing the results from the table, we can see that the quality of reconstructions obtained by logistic regression with PCA and wavelet, and by total variation are quite good. In contrast, the reconstructions by logistic regression with an elastic net and by Tikhonov regularization are slightly worse. Furthermore, for the case of logistic regression with PCA, the mean absolute error (MAE) is even lower than for total variation, while the mean squared error (MSE) and mean percentage error (MAPE) for the total variation technique is smaller than that for logistic regression with PCA (Table 14). Logistic regression with wavelet preprocessing is the most robust to noise, while logistic regression with PCA decomposition is the most sensitive to the real model.

Conclusions
The main purpose of the work was to develop image reconstruction algorithms for leakage analysis in various flood embankment models. The presented solution enables a fairly accurate assessment of the properties of the tested objects, and gives promising results. Algorithms based on logistic regression machine learning methods with an elastic net regularisation, PCA and wave preprocessing were used to calculate the leakage in order to obtain more accurate and stable image reconstruction, leading to a solution of the inverse problem in EIT. A measurement system and three models for the reconstruction of tomographic images with point and depth electrodes were developed in a laboratory study. Using a system of multiple separate algorithms running simultaneously to image the cross-section of a flood barrier allows the generation of accurate representations of specific patterns. The quality of this data is adequate to identify leakage over time correctly.
Furthermore, given the ability to take measurements at fixed time intervals, it is easy to determine the velocity of the leakage propagation. This information enables an accurate diagnosis to help determine the reliability of the dam. With this information, the tomographic system can plan appropriate actions before dam failure.
The approach presented was used to identify areas of high-probability inclusions, so logistic regression was used for this purpose. The main problem in EIT is the problem of the collinearity of features (measurements from the electrodes). In order to improve the quality of the classifier, additional methods were applied. Using deterministic methods, the conductivity distribution was determined and compared with the machine learning methods. The use of logistic regression for each finite element makes it possible to determine (extract) the inclusion regions. In the case of signals from electrodes without interference, the analysis of the reconstruction results using logistic regression with an elastic net and PCA is slightly better than logistic regression with wavelet preprocessing. However, when additional disturbances are introduced to the electrodes, recognising the inclusion in the visual area is better for logistic regression with wavelet preprocessing.
The study shows that the wavelet technique is a competitive approach compared to PCA and elastic net. Additionally, the reconstructions are more robust to perturbations arising during measurements. Many wavelets are known in the literature. Further studies will investigate the quality of reconstructions using different wavelets.