## 3 Set Up Buildings' Settlement Prediction Model
### Set Up LSTM Model
#### 3.2.3 Selection of Hyperparameters  
Hyperparameter tuning is crucial for LSTM predictive models when the dataset is small [45]. The main hyperparameters that usually need to be tuned before the network starts training are batch size and training set ratio. Among them, the batch size will have an impact on the network accuracy and convergence rate, and in general, 32 was taken as the default value of the batch size [46]. The building settlement dataset in pit engineering is not complex; therefore, the batch size (8, 16, 32, 64, 128) is used for training in this paper. Meanwhile, in traditional model training, 80% of the data are generally used as the training set for model training, and 20% of the data are used as the test set for model effect checking, and the results are often quite different from the actual engineering; therefore, this paper uses the training set ratio (90%, 80%, 70%, 60%, 50%) for training.  
The settlement monitoring data of 10 monitoring points (F1, F2, F14, F15, F147, F148, F168, F169, F174, F175) of I-K were input into the model for training, and the model was used to train the monitoring data from each of the 10 measurement sites sequentially. When changing the size of the training batch, the training set ratio was kept constant, and the average of the RMSE was calculated after the training of the 10 measurement points. Similarly, the same is true when changing the training set ratio. The RMSE was used as an evaluation index for the effect of hyperparameters in the model to affect the prediction effect of the settlement [47], and the main hyperparameters of the model were determined by the average of the root-mean-square error of all the measurement points at the time of training (the batch size, the ratio of the training set), and the obtained results can be used as the reference value for the artificial determination of hyperparameters for the prediction of the building settlement by the neural network model.  
We input the settlement monitoring data of each measurement point for training, where the basic values of batch size and training set proportion are taken as 32 and 80%, respectively, and the evaluation results under different hyperparameters during the model training are shown in Table 4. In the table, RMSE is the average of the root-mean-square error during the training of 10 measurement points.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Hyperparameters** & **Value** & **RMSE (mm)** \\ \hline \multirow{4}{*}{Batch size} & 8 & 0.64 \\  & 16 & 0.59 \\  & 32 & 0.61 \\  & 64 & 0.73 \\  & 128 & 0.71 \\ \hline \multirow{4}{*}{Training set ratio} & 90\% & 0.63 \\  & 80\% & 0.61 \\ \cline{1-1}  & 70\% & 0.67 \\ \cline{1-1}  & 60\% & 0.50 \\ \cline{1-1} \cline{2-4}  & 50\% & 0.55 \\ \hline \hline \end{tabular}
\end{table}
Table 4: RMSE of various hyperparameter values during monitoring points training.  
The training results show that when the batch size and training set ratio are taken as 16 and 60%, respectively, the average RMSE of the measurement points is the smallest, namely 0.59 and 0.50, respectively. Therefore, when using the LSTM network model for predicting building settlement, the batch size of 16 and the training set ratio of 60% can be used as the reference values for the hyperparameter settings.