# A Completion Method for Missing Concrete Dam Deformation Monitoring Data Pieces
## 2 Method
### Completion Strategy for a Single Missing Value
#### 2.1.2 Single-Value Missing Data Completion Based on NLM (Non-local Means) Method  
According to the function value or derivative value of the existing data points, the traditional interpolation method approximates the objective function by constructing a curve satisfying the basic conditions through certain mathematical methods, which can effectively solve the problem of time series inhomogeneity to a certain extent. However, these traditional interpolation methods are only based on known data and do not consider the physical significance of practical problems. The homogenization of the time series of non-uniform deformation is a supplement to the deformation information of the concrete dam at the unknown time point, which needs to take into account the actual deformation laws of the dam. On the other hand, in the actual deformation time series, the deformation values at different moments cannot be represented by precise functional expressions, so the derivative values of the data points cannot be obtained, and in this case, the traditional interpolation method is not applicable to solve the above problems. In view of the situation that the time series have a long span and an uneven distribution, this paper adopts the non-local means method (NLM algorithm) [28] using non-local knowledge of deformation information and the self-similarity of information laws at different moments in the deformation sequence to estimate the deformation value at the missing time periods. On this basis, a complete deformation sequence having the strongest correlation with the deformation trend of the target is introduced as the calculation basis. The aim of this method is to characterize the missing information by considering the self-correlation between the deformation values at different moments of the deformation sequence and the correlation between the measurement points corresponding to the position of the target. The main idea of the NLM algorithm is to obtain a new image by weighting and averaging the gray values of all pixels in the original image regarding the weight coefficients of similarity. In this paper, it is applied to the homogenization of concrete dam deformation time series to solve the single-value missing problem. Assuming that the measured value of A deformation measurement point of the dam body is uneven, in order to estimate single missing data, the following steps are performed. First, from the perspective of the whole deformation time series of the measuring points, find the measuring point B with the strongest correlation with the deformation trend of measuring point A and complete sequence. Measuring point B can be found from many measuring points on the same monitoring perpendicular line of point A. In this paper, the Pearson correlation test is adopted to calculate the correlations among deformation data of measurement points. Pearson correlation coefficient is a statistical parameter used to quantitatively measure the correlation between variables, and its calculation formula is:  
\[r=\frac{N\sum\delta_{1i}\delta_{2i}-\sum\delta_{1i}\sum\delta_{2i}}{\sqrt{N \sum\delta_{1i}^{2}-\left(\sum\delta_{1i}\right)^{2}}\sqrt{N\sum\delta_{2i}^{ 2}-\left(\sum\delta_{2i}\right)^{2}}} \tag{18}\]  
where \(\delta_{1i}\) and \(\delta_{2i}\) represent the deformation value of measuring points A and B at the same time, and N represents the total number of sequences. It can be seen from Equation (18) that the value of Pearson's correlation coefficient varies between \(-1\) and \(1\), and the greater the absolute value of the correlation coefficient, the stronger the correlation between the two variables. When the correlation coefficient is closer to \(1\) or \(-1\), the correlation is stronger, the closer the correlation coefficient to \(0\), the weaker the correlation. In addition, when the correlation coefficient is greater than \(0\), the two variables are positively correlated.