# Deep Clustering of Student Code Strategies Using Multi-View Code Representation (CMVAE)
## 4 Experiment and Discussion
### Experimental Results and Analysis  
#### 4.2.1 Labeled Datasets  
Table 1 shows the clustering results of the proposed model on labeled datasets across different problems. For each problem, the programming language used, the topics, the clustering accuracy, and the FM index are listed. The accuracy and FM index measure the classification precision and consistency of the clustering results, respectively. A higher accuracy reflects a stronger match between the clustering outcomes and the true labels, whereas the FM index takes both precision and recall into account when evaluating the clustering performance.  
For the 11 labeled problems, the average clustering accuracy reached 84.2%, and the average FM index was 0.806, indicating that the proposed model can effectively cluster code strategies. In the Sorting-C# and Sorting-Python datasets, although they involve code from different programming languages, both belong to the category of sorting algorithms, and the clustering results were relatively consistent. The accuracy for these datasets was 93.9% and 91.4%, respectively, demonstrating the stability of the proposed model in similar tasks.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & **Programming Language** & **Topics** & **Accuracy (\%)** & **FM Index** \\ \hline PaCon & C\# & S2-L2 & 70.0 & 0.717 \\ PaCon & C\# & S2-L5 & 78.7 & 0.756 \\ PaCon & C\# & S2-L6 & 78.4 & 0.797 \\ PaCon & C\# & S3-L1 & 81.1 & 0.747 \\ PaCon & C\# & S3-L2 & 94.9 & 0.920 \\ PaCon & C\# & S3-L3 & 97.3 & 0.948 \\ PaCon & C\# & S3-L6 & 73.9 & 0.707 \\ PaCon & C\# & S4-L2 & 88.2 & 0.781 \\ PaCon & C\# & S4-L6 & 79.2 & 0.768 \\ Sorting-C\# & C\# & Sorting Algo & 93.9 & 0.876 \\ Sorting-Python & Python & Sorting Algo & 91.4 & 0.854 \\ \hline Average & & & 84.2 & 0.806 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Clustering results for individual topics within each dataset.  
Table 2 presents the clustering results using different clustering methods on labeled datasets, with the evaluation metrics for the PaCon dataset being averaged over the nine problems in the dataset. To evaluate the effectiveness of CMVAE, we compare it with the following classical clustering methods: k-means [17], spectral clustering [18], MeanShift [19], and deep clustering DEC [21].  
When compared to conventional methods such as k-means and spectral clustering, the CMVAE model achieves considerable improvements in both its accuracy and FM index scores, underlining the effectiveness of the model in the clustering stage. Meanwhile, the traditional deep clustering method MeanShift [19] performed poorly across the datasets, with an accuracy of only 30.3% on the Sorting-C# dataset. This may be due to its limited effectiveness in clustering high-dimensional data. When dealing with high-dimensional and complex data, traditional clustering methods are limited by the model's representational capacity, which hampers the effective integration of multi-view features. By contrast, DEC [21] leverages deep feature extraction capabilities, achieving overall better performance than traditional methods. However, the CMVAE model, through multi-view feature fusion and deep embedding learning, achieves comprehensive improvements in accuracy and FM index, demonstrating its superiority in the code strategy clustering task.