## 4 Results and Discussion
### Predictive Model Results
#### 4.2.4 Model Training and Scoring
\[Recall=\frac{a}{a+c} \tag{3}\]  
The F1-score is an evaluation metric that combines precision and recall into a single value by computing their harmonic mean; it is particularly useful in situations with imbalanced class distributions, as it accounts for both false positives and false negatives in its calculation. \[F1\ Score=2\ *\ (\frac{precision\times recall}{precision\times recall}) \tag{4}\]  
Comparison of the Evaluation Metrics  
After extracting the key indicators from the phase analysis, we fed them into the four selected classification algorithms. We then evaluated the various performance metrics of each classification algorithm on test dataset. Figure 9 clearly shows that DTree achieved the highest accuracy rate for predicting student motivation. The results obtained for evaluating the performance of various classification models are as follows. Starting with the LR classifier, the performance for the negative class was characterized by a precision of 0.56, a recall of 0.33, and an F1-score of 0.42. For the positive class, the classifier achieved a precision of 0.63, a recall of 0.81, and an F1-score of 0.71. For the KNN model, the precision values for the negative and positive classes were 0.80 and 0.86, respectively. The recall and F1-scores for the negative class were both 0.80, while for the positive class, they were 0.86 and 0.86, respectively. Regarding SVM, the negative class achieved a precision of 0.00, a recall of 0.00, and an F1-score of 0.00. However, for the positive class, the precision was 0.58, with a recall of 1.00, and an F1-score of 0.74. The DTree classifier demonstrated strong performance, achieving a precision of 0.88 and a recall of 1.00 for the negative class, yielding an F1-score of 0.94. For the positive class, the precision was 1.00, with a recall of 0.90, and an F1-score of 0.95 (see Table 11). 3 Confusion matrix comparison  
Figure 10 illustrates the confusion matrices for the four different algorithms we used in the development of our model. The total number of correct and incorrect predictions from the available dataset was used to analyze the performance of the model. The total number of instances in a confusion matrix represents the number of test samples used to evaluate the model's predictions. The expected label is based on the true label shown in Figure 10, where **1** indicates motivated (the motivation to continue studying), and **0** indicates not motivated. Using the test dataset for LR, 17 instances of not motivated and 5 instances of motivated were correctly classified, while the remaining data were misclassified. For the KNN, 18 instances of not motivated and 12 instances of motivated were correctly identified, with the rest incorrectly classified. With SVM, 21 instances of not motivated were correctly classified, but none of the motivated cases were correctly identified--all others were misclassified. Using the DTree algorithm, 19 instances of not motivated and 15 of motivated were correctly classified, while the remaining cases were misclassified. The overall results of the confusion matrix for the four algorithms are shown in Table 11 (see Table 11). The results of testing the different machine learning models showed that DTree obtained the highest total predictions, while KNN, SVM, and LR obtained 30, 21, and 22, respectively (see Table 12). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**ML** & **Label** & **Precision** & **Recall** & **F1-score** \\ \hline \multirow{2}{*}{Logistic Regression (LR)} & Negative & 0.56 & 0.33 & 0.42 \\  & Positive & 0.63 & 0.81 & 0.71 \\ \hline \multirow{2}{*}{K-Nearest Neighbors (KNN)} & Negative & 0.80 & 0.80 & 0.80 \\  & Positive & 0.86 & 0.86 & 0.86 \\ \hline \multirow{2}{*}{Support Vector Machine (SVM)} & Negative & 0.00 & 0.00 & 0.00 \\  & Positive & 0.58 & 1.00 & 0.74 \\ \hline \multirow{2}{*}{Decision Tree (DTree)} & Negative & 0.88 & 1.00 & 0.94 \\  & Positive & 1.00 & 0.90 & 0.95 \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Summary of evaluation metrics. Figure 9: Comparison of accuracy.