# A Method for Constructing a Synthesis Health Index for Metro Vehicle Wheelsets
## 3 The Construction Process of the Synthesis Health Index for Metro Vehicle Wheelsets
### Classification of Metro Vehicle Wheelset Health States Based on Hierarchical Clustering  
Metro vehicle wheelset failures represent typical cases of degradation failure, with distinct characteristics exhibited at different degradation stages. This study employs clustering algorithms to categorize the metro vehicle wheelset contour data into multiple classes, with each class corresponding to a different health state of the wheelset. Before clustering, the number of health states present in the metro vehicle wheelset cannot be determined. Therefore, clustering algorithms that require a predetermined number of clusters, such as k-means and KNN, are unsuitable for this scenario. The hierarchical clustering (HC) algorithm does not require a predetermined number of clusters, is computationally straightforward, and is highly adaptable. Thus, this study employs an agglomerative hierarchical clustering algorithm to classify the health states of metro vehicle wheelsets, following the computational steps outlined below:  
Step 1: Initialization. Initially, each data point is treated as an individual cluster; therefore, if there are N data points, there will be N clusters. Step 2: Calculate the distances between all pairs of clusters. Using the selected distance metric, compute the distances for all possible pairs of clusters and store the results in a distance matrix. Step 3: Iterative merging. Identify the two closest clusters in the distance matrix and merge them into a new cluster. Then, update the distance matrix to reflect the distances between the new cluster and the remaining clusters. Step 4: Termination condition. Continue iterating until all data points are merged into a single cluster, resulting in the formation of a dendrogram. Step 5: Select truncation. If necessary, choose a level to truncate the dendrogram, thereby determining the final number of clusters. Assuming there are data to be classified, we represent them with an \(m\times n\) matrix \(X\). The distance between two vectors \(x_{i}\) and \(x_{j}\) is represented using Euclidean distance:  
\[d=\left(x_{i}-x_{j}\right)\left(x_{i}-x_{j}\right)^{\prime} \tag{11}\]  
Assuming there are two clusters, denoted as cluster_a and cluster_b, containing \(n_{a}\) and \(n_{b}\) members, respectively, with \(\overline{x_{a}}\) and \(\overline{x_{b}}\) representing the centroids of these clusters. The Ward-linkage between a and b is calculated as follows:  
\[d_{ward}(a,b)=\sqrt{\frac{2n_{a}n_{b}}{n_{a}+n_{b}}\;\overline{x_{a}}-\overline {x_{b}}_{2}} \tag{12}\]  
The HC classification process ultimately generates a dendrogram, often referred to as a binary tree. By applying specific pruning rules to this binary tree, the final classification results can be obtained. Commonly used pruning criteria include the \"inconsistency coefficient\" and the \"maximum number of classifications\". Figure 2 illustrates the use of the maximum number of classifications to derive results from the dendrogram. However, this approach requires a prior decision on how many categories the data should be divided into, which undermines one of the key advantages of hierarchical clustering. Furthermore, when the exact number of health state categories for the metro vehicle wheelsets is unclear, this method introduces a certain degree of subjectivity. In the figure, the orange color represents the first cluster of hierarchical clustering, the blue color represents the second cluster, and the green color represents the third cluster. To derive results from the dendrogram based on the inconsistency coefficient, it is essential to first determine the depth \(d\), which determines how many layers of information will be considered in the calculation of the inconsistency coefficient. The depth \(d\) specifiesthe number of hierarchical levels to be evaluated, allowing for the assessment of differences in linkage heights between different layers.