## 3 Methods
### Variable Selection for Clustering Based on Cramer's V--Spearman Correlation Coefficient  
The trip chains data used in this study consist of twenty variables, and there are two main challenges if all of them are used for cluster analysis [52]. First, high dimensionality can lead to the \"curse of dimensionality\" during clustering. Second, significant correlations between variables may affect the accuracy and efficiency of the clustering process. To address these issues, a variable selection process is implemented to eliminate highly correlated variables while retaining those that significantly impact the clustering results [53]. Common methods for calculating correlation include Spearman's correlation coefficient, the Pearson correlation coefficient, Cramer's V coefficient, the chi-square test, and covariance. Spearman's coefficient is suitable for categorical data or data that does not fully adhere to a normal distribution [54]. It is less sensitive to outliers and does not impose strict data requirements. [PERSON]'s coefficient is applicable for analyzing linear relationships between continuous variables, requiring normally distributed data and assuming linearity between variables [55]. Cramer's V is used to assess correlations between discrete, unordered data [56]. The chi-square test primarily compares proportions among two or more samples and examines the association between categorical variables [57]. Covariance measures the relationship between two continuous random variables [58]. Because the twenty variables describing trip chains include both unordered categorical and numerical variables, a single method cannot calculate the correlation between all variables. Therefore, a combined method based on Cramer's V and Spearman was applied in this study. The correlation coefficient between six unordered categorical variables, which \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **May 2019** & \multicolumn{3}{c}{**May 2021**} \\ \hline Direction & Number of Trip Chains & Percentage & Number of Trip Chains & Percentage \\ Beijing–Tianjin & 36,920 & 42.11\% & 27,518 & 37.13\% \\ Tianjin–Beijing & 34,100 & 38.89\% & 20,199 & 27.25\% \\ Beijing–Shijiazhuang & 6965 & 7.94\% & 10,956 & 14.78\% \\ Shijiazhuang–Beijing & 3964 & 4.52\% & 7829 & 10.56\% \\ Tianjin–Shijiazhuang & 3058 & 3.49\% & 4126 & 5.57\% \\ Shijiazhuang–Tianjin & 2675 & 3.05\% & 3487 & 4.70\% \\ Total & 87,682 & 100\% & 74,115 & 100\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The data size. were Weekday, Gender, Type-O, Type-D, Mode-O, and Mode-D, was calculated using the Cramer's V coefficient method. In this study, as the numerical variables were grouped variables with a small range of values, they could be regarded as ordered categorical variables. Therefore, the Spearman method was applied to calculate correlations among numerical variables, as well as between unordered categorical and numerical variables. The specific calculation methods are outlined below:  
1. Cramer's V coefficient method  
Cramer's V coefficient method was introduced by [PERSON] in 1946 and is calculated based on Pearson's chi-square statistics, considering the total sample size and degrees of freedom. The specific formula is as follows:  
\[V=\sqrt{\frac{\chi^{2}}{n\times min(r-1,c-1)}} \tag{1}\]  
\[\chi^{2}=\sum\frac{(O-E)^{2}}{E} \tag{2}\]  
where \(\chi^{2}\) is the chi-square statistic obtained from a contingency table formed by two categorical variables, \(n\) represents the total sample size, \(r\) is the number of categories for the first variable, \(c\) is the number of categories for the second variable, min (\(r-1\), \(c-1\)) denotes the smaller of the two values derived from reducing the counts of each categorical variable by one, \(O\) indicates the observed frequency, and \(E\) signifies the expected frequency. The value of [PERSON]'s V coefficient ranges from 0 to 1. The value of [PERSON]'s V coefficient being less than 0.3 indicates a weak correlation between the two variables, while a value greater than 0.6 suggests a strong correlation.