## 3 Experimental Design
### Cluster Analysis
#### 3.3.1 Selection of the Optimal K Value
Cluster Analysis for Male and Female Groups  
K-means clustering is applied separately to the data of the male and female groups. The silhouette score [40] and Calinski-Harabasz index are calculated for each group, and the trends of these indicators are plotted as shown in Figures 9 and 10. These plots are used to visualize the changes in the clustering quality as a function of K and assist in identifying the optimal number of clusters for both the male and female groups. Figure 9: Corresponding relationship between SSE and K value of male group. The results indicate that when K = 3, the Calinski-Harabasz index reaches its maximum value (5387.11), while the silhouette score is 0.351379, which is the highest among all K values. This suggests that the clustering quality is optimal. Therefore, the optimal number of clusters for the male group is three. For the female group, when K = 4, the Calinski-Harabasz index reaches its maximum value (2704.64), and the silhouette score is also relatively high (0.164922). Based on these two metrics, the optimal number of clusters for the female group is determined to be four. Dimensionality Reduction and Accuracy of Results  
To enhance the interpretability and visualization of high-dimensional data, Principal Component Analysis (PCA) was employed to reduce the feature space to three principal components. As shown in Figure 11, this dimensionality reduction strategy preserved approximately 79.52% of the total variance in the male group and 70.92% in the female group, indicating that the majority of the original information was effectively retained despite the dimensionality reduction. The transformed three-dimensional feature space reveals a more distinguishable and structured distribution of samples, thereby facilitating more intuitive and effective  
Figure 11: Histogram of the proportion of variance explained by PCA. Figure 10: Corresponding relationship between SEE and K value of the female group. clustering by the K-means algorithm. This transformation addresses the challenges posed by high-dimensional datasets, which are often difficult to interpret or process directly, especially when performing unsupervised learning tasks such as clustering. The first three principal components capture the dominant variance across the dataset and serve as a compact yet informative representation of the original feature space. The improved clustering separability observed in the PCA-transformed data provides robust support for the subsequent classification and pattern analysis. To better construct a comprehensive physical health portrait of students, it is essential to identify the most distinguishing features that characterize different clusters. In this study, prior to constructing the student health portraits, we treated the clustering labels as target variables and conducted feature importance analysis using four widely adopted supervised learning models: XG Boost, Random Forest, decision tree, and logistic regression. Each model was trained using the same set of features employed during clustering as input variables (X), with the clustering classification results as the target variable (y). For XG Boost [41], the model was configured with default parameters, except for n_estimators = 100 and random_state = 123. Similar settings were adopted for Random Forest and decision tree models, while logistic regression was configured with solver = 'bfgs' and max_iter = 1000 to ensure convergence. After training, we extracted feature importance scores from each model: for tree-based models (XG Boost, Random Forest, and decision tree), the built-in feature_importances_attribute was used; for logistic regression, the absolute values of the model coefficients were taken as a proxy for importance, as they reflect the contribution of each feature to the decision boundary.