## 4 Experiments and Analysis  
### Regression Prediction Experiments  
To assess the performance of the regression model in predicting student performance for the four chosen courses (Data Structures, Compilation Principles, Algorithm Analysis and Design, and Operating Systems), we randomly split the dataset into a training set comprising 70% of the 292 student achievement data and a test set comprising the remaining 30%. The evaluation metrics for the four regression algorithms are presented below. Based on the findings presented in Table 5, we can infer the following analytical insights. (1) Algorithm Results Comparison: Looking at the mean square error and root mean square error metrics, lasso regression had the lowest values, suggesting the best fit. On the other hand, decision tree regression had the highest mean square error and root mean square error, indicating the worst fit. When considering relative error, lasso regression had a relatively small relative error in predicting the performance of the four courses, while the other three regression types had larger relative errors. This implies that lasso regression's predicted results were closer to the true values compared to the other regressions. (2) Model Selection Analysis: Based on the analysis, if the objective is to choose the most suitable regression model for predicting course performance, lasso regression can be considered. It performed well across all four courses, with low mean squared error and relative error. If the goal is to predict the performance for a specific course, it would be beneficial to select an appropriate model based on the characteristics of that specific course. For instance, the Compiler Principles course may benefit from ridge regression or lasso regression; the Operating Systems course may be better suited to linear regression or ridge regression; for the Data Structures course, lasso regression or linear regression may be useful; and the Algorithm Analysis and Design course may benefit from ridge regression or linear regression. To calculate the accuracy of each regression algorithm, we can set a threshold of 10 points as the acceptable difference between the predicted result and the actual result. If the difference falls within this threshold, we consider the prediction to be correct, as shown in Table 6 and Figure 3:  
Based on the experimental findings presented in Table 6 and Figure 3, we can derive the following analytical conclusions. Firstly, regarding the prediction of scores for the Data Structures course, linear regression, ridge regression, and lasso regression achieved similar prediction accuracies, while decision tree regression had the lowest accuracy. For the prediction of Compiler Principles course scores, linear regression and ridge regression yielded equivalent prediction accuracies. However, lasso regression outperformed both by achieving the highest accuracy, while decision tree regression had the lowest accuracy. Secondly, in terms of predicting Algorithm Analysis and Design course scores, linear regression, ridge regression, and lasso regression achieved similar prediction accuracies, while decision tree regression had the lowest accuracy. Thirdly, when it comes to predicting Operating Systems course performance, linear regression and ridge regression showed comparable accuracies, while lasso regression \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Course Name** & \begin{tabular}{c} **Linear** \\ **Regression** \\ \end{tabular} & \begin{tabular}{c} **Ridge** \\ **Regression** \\ \end{tabular} & \
\begin{tabular}{c} **Lasso** \\ **Regression** \\ \end{tabular} &
\begin{tabular}{c} **Decision Tree** \\ **Regression** \\ \end{tabular} \\ \hline Data Structures & 0.78 & 0.78 & 0.78 & 0.68 \\ Compiler Principles & 0.78 & 0.78 & 0.79 & 0.70 \\ Algorithm Analysis & 0.81 & 0.81 & 0.81 & 0.72 \\ and Design & 0.75 & 0.75 & 0.77 & 0.68 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Precision comparison of four types of regression algorithms.