## 3 Methodology
### Data Preprocessing  
A major problem encountered with machine-learning predictive models was the difficulty in converging the learning curve due to issues such as overfitting and underfitting. The dataset needed to be preprocessed to mitigate data inconsistencies and enhance the likelihood of curve convergence [22].  
Dealing with outliers in a dataset was one of the critical preprocessing steps in machine-learning prediction, as outliers could lead to problems in model training and prediction. The approach employed in this paper was outlier identification based on the Z-score (standardized score) method. This approach was a standardized metric used to measure the degree of deviation of a data point from the mean. The relative position of a data point  
Figure 3: Horizontal displacements of the envelope on selected dates at monitoring points CX-1, CX-2, and CX-58.  
in the overall data distribution was determined by comparing the differences between different samples. Specifically, the \(Z\) score quantified the amount of deviation.  
\[Z=\frac{(X-\mu)}{\sigma} \tag{1}\]  
where \(Z\) is the \(Z\) score, \(X\) is the data point's value, \(\mu\) is the dataset's mean, and \(\sigma\) is the dataset's standard deviation.  
Through the \(Z\)-score method for the target value of each characteristic factor for the outlier test, in addition to the horizontal displacement of the enclosure structure, support axial force, building settlement, and column settlement of a small portion of the data existing \(4>|Z|>3\) data (about 0.37% of the total number of residents), and through the analysis of this part of the data, the deviation belongs to the standard data fluctuation, and did not reach the extreme deviation. So, do not deal with it.  
When dealing with missing values in the past, interpolation was employed to fill in sporadically distributed missing values, while the nearest valid value to the missing value was used to fill in continuously distributed values, especially those located at the beginning and end parts of the data. Nevertheless, the cleaned data often exhibited variations that could impact machine-learning outcomes. Data standardization was necessary to mitigate this effect and enhance the convergence speed to some extent. Data standardization, also known as feature scaling, converts data with dissimilar scales or ranges into a standard form with similar scales for improved application in machine-learning algorithms.  
In practice, different features typically possessed varying units of measurement and value ranges. These inconsistent scales and value ranges could have adverse effects on the predictions made by machine-learning prediction algorithms. Data normalization aimed to eliminate scale differences between features, making them more suitable for comparison and analysis.  
The range-scaling method, specifically min-max normalization, used in this study, involved scaling the range of feature values to a fixed interval, typically in the range [0, 1]. The formula used was as follows:  
\[x_{Scaled}=\frac{x-x_{min}}{x_{max}-x_{min}} \tag{2}\]  
Figure 4: Flow chart of the experiment.  
\(x_{Scaled}\) represents the scaled values, \(x\) denoted the original values, and \(x_{min}\) and \(x_{max}\) are the minimum and maximum values of the features, respectively. This method preserves the distribution information of the original data and is suitable for cases where the data did not follow a normal distribution.  
After the preprocessing, the dataset was divided into training and test data in an 8:2 ratio. The training set was utilized for constructing and training the machine-learning model, enabling it to learn patterns, regularities, and associations from the training data. The test set, on the other hand, was employed to assess the performance of the machine-learning model.