## 4 Results and Analysis
### Performance Comparison: TF-IDF + XGBoost vs. Baseline Models
This characteristic makes TF-IDF particularly effective in distinguishing key terms based on frequency and categorical significance. In contrast, transformer-based models, which prioritize contextual understanding, may not fully utilize such structured information for classification. Moreover, this suggests that semantic structure in learning errors may not be \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Model** & **Accuracy** & **Precision** & **Recall** & **F1 Score** \\ \hline TF-IDF + Logistic Regression & 0.9677 & 0.9652 & 0.9635 & 0.9643 \\ TF-IDF + SVM & 0.9656 & 0.9621 & 0.9603 & 0.9612 \\ LightGBM & 0.0038 & 0.0030 & 0.0025 & 0.0027 \\ BERT & 0.0000 & 0.0000 & 0.0000 & 0.0000 \\ DistilBERT & 0.0017 & 0.0015 & 0.0013 & 0.0014 \\ TF-IDF + XGBoost & 0.9885 & 0.9867 & 0.9654 & 0.9860 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance comparison results (Accuracy and F1 Score). as crucial as their explicit Term Frequency and categorical representation. Unlike general text classification tasks that require deep contextual understanding, mathematical error classification relies on structured terminology and well-defined patterns (e.g., 'addition mistake','miscalculated fraction'). In such cases, TF-IDF effectively captures frequent but category-specific terms, whereas transformer-based models like BERT and DistilBERT, which rely on sentence-level contextual embeddings, may struggle due to the relatively short and formulaic nature of diagnostic assessment data. These findings suggest that in structured classification problems like educational diagnostics, traditional frequency-based approaches can sometimes outperform more advanced deep learning architectures. Given these insights, future research could explore hybrid approaches that integrate TF-IDF with contextual embeddings. Combining statistical term importance from TF-IDF with the semantic relationships captured by transformer models may further enhance educational data analysis. One potential direction is to employ TF-IDF for initial feature selection and subsequently fine-tune a lightweight transformer model on the most informative terms. Additionally, techniques such as attention-based keyword extraction or domain-specific word embeddings could be integrated to bridge the gap between frequency-based and context-based text representations. These hybrid models could provide more comprehensive insights into students' learning errors while maintaining computational efficiency. Figure 3 illustrates the overall process of the proposed system. As illustrated in the figure, the TF-IDF + XGBoost model outperforms all baseline models, achieving the highest accuracy and F1 Score. The comparative visualization clearly demonstrates the superiority of XGBoost in multi-class classification and its ability to effectively capture complex data relationships. These findings confirm that the TF-IDF + XGBoost model is highly reliable for analyzing text-based educational data and generating personalized feedback in real-world applications. In conclusion, the proposed TF-IDF + XGBoost model demonstrated the highest performance across all metrics, proving its suitability for analyzing and classifying students' learning statuses. The comparative analysis confirms that XGBoost excels in multi-class classification and capturing nonlinear data relationships, making it a strong candidate for real-world educational applications. The proposed TF-IDF + XGBoost model surpassed  
Figure 3: Performance comparison of different models (Accuracy and F1 Score). all benchmark models in classification performance, achieving Accuracy of 0.9885 and F1 Score of 0.9860, making it an effective tool for real-time feedback and personalized learning plan development in educational environments. Conversely, BERT and DistilBERT require larger datasets and extensive hyperparameter optimization, while LightGBM was found to be unsuitable for text-based data processing.