## 3 Case Study
### Prediction Analysis after Clustering  
The short-term variation trend of the dam displacement sequence may contain similar characteristics in different periods. The grouping of data into classes or clusters is a process of data clustering, which can make the data in each cluster highly similar while being very dissimilar to data from other clusters. As the data feature in each group is concentrated after the clustering process, better performance can be achieved by implementing the predicting methods for each group separately. As mentioned in Section 2.2.3, the SSA-KHM model can better overcome the shortcomings of traditional clustering models, which are sensitive to the initial clustering center, and thus improve the accuracy of clustering. Consequently, this paper uses the SSA-KHM model to cluster the data. Notably, the choice of the clustering number may affect the accuracy of the SSA-KHM model. TO address this problem, researchers have proposed some criteria to determine the optimal number of clusters. Nevertheless, the effectiveness of these criteria for dam displacement clustering is still unclear, particularly for the clustering problem of dams' multi-step displacement prediction. In this paper, the optimal number of clusters is determined using the traversal method [51]. Figures 11 and 12 plot the distribution of the datasets after clustering. The results show that the grouped sub-datasets are distributed around their respective clustering centers, indicating that the proposed method can effectively extract the different characteristics contained in the sequence and precisely cluster data with the same characteristics. Table 6 demonstrates the prediction results under different classifications. As shown in Table 6, the optimal number of clusters is acquired by quantifying the statistical indicators, and the model constructed by three clusters provides better fitting performance than the model constructed by the other clustering numbers. Nevertheless, the deformation characteristics of gravity dams are less complicated due to their relatively simple structural forms and stable operating state. Therefore, fewer features of dam deformation can be extracted by clustering methods, which results in a mild improvement in the prediction accuracy. In view of the above, the proposed method can be further applied to other hydraulic structures, such as earth-rock dams, and arch dams where more complex deformation characteristics are present. By analyzing the metrics in Tables 7 and 8, and Figure 13, the effects of different cluster numbers for different prediction days can be obtained. When taking K = 3 (the optimal number), the predicting accuracy of the model outperforms other scenarios with various clustering numbers within different forecast days. Meanwhile, as the number of prediction days increases, the prediction accuracy of the proposed model can be remarkably enhanced when the optimal clustering number is adopted. Figure 11: Clustering results at K = 3. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Number of Clusters** & **K = 1** & **K = 2** & **K = 3** & **K = 4** & **K = 5** & **K = 6** & **K = 7** & **K = 8** \\ \hline RMSE & 0.2235 & 0.2237 & **0.2215** & 0.2268 & 0.2256 & 0.2261 & 0.2242 & 0.2260 \\ \hline MAE & 0.1419 & 0.1444 & **0.1417** & 0.1444 & 0.1434 & 0.1447 & 0.1426 & 0.1423 \\ \hline \hline \end{tabular} Note: The best results are highlighted in boldface.  
\end{table} 
Table 6: Performance comparison of different number of clusters on the test set.