# Graph Neural Network for Senior High Student's Grade Prediction
## 3 Experiments
Through extensive trials, the hyperparameters are determined. The MLP contains two hidden layers. Each of the hidden layers has 16 neurons (nodes). The loss function is set to be the mean square error (MSE) [33]:  
\[Loss=\frac{1}{n}\sum(||\hat{\mathbf{v}}-\mathbf{v}||^{2}+||\hat{\mathbf{e}}- \mathbf{e}||^{2}+||\hat{\mathbf{u}}-\mathbf{u}||^{2}) \tag{2}\]  
where \(n\) represents the batch size. \(\hat{\mathbf{v}}\) means the predicted node attribute (subject grade and rank). \(\mathbf{v}\) is the testing node attribute. \(\hat{\mathbf{e}}\) means the predicted edge attribute (ratio of the receiver node attribute to sender node attribute). \(\mathbf{e}\) is the testing edge attribute. \(\hat{\mathbf{u}}\) means the predicted global attribute (total grade and average rank). \(\mathbf{u}\) is the testing global attribute. The Adam optimization method [34] is applied to train the model. The learning rate is set to be 0.02. The performance of the proposed model can then be investigated through the loss function and the error between the predicted grade and the test grade. Firstly, we test the performance of the graph neural network for predicting the grade of student 14295 with the data of nine examinations. The grades of the previous eight examinations are used for training and the grades of the ninth examination are used for testing. The curve of the loss function value shows the performance, seen in Figure 9. Considering that the last value (also the minimal value) of the loss function is 5867.9570, the prediction error (between the predicted grades (of the ninth examination) and the test grades (of the ninth examination)) should be extremely large. It can be seen that the graph neural network cannot achieve a satisfactory prediction performance in this small data situation. The lack of data leads to the underfitting problem [35]. Figure 8: The original data and the complementary data. In order to deal with the underfitting problem, we use the linear interpolation method to extend the data of student 14295 along the date axis. The extended data (the total size is 565) can be seen partly in Table 4.  
Then, based on the extended data, the prediction performance of the graph neural network is tested again. We divide the extended data into three parts, i.e., the training dataset, validation dataset, and testing dataset. The training dataset contains the previous 80% data, which are from 20 April 2017 to 15 July 2018. The validation dataset includes the following 10% data that are from 16 July 2018 to 10 September 2018. The testing dataset contains the last 10% data which are from 11 September 2018 to 5 November 2018. The graph neural network is trained with the training dataset. The loss function curve is shown in Figure 10. The value of the loss function converges and finally reaches 1.2070. The trained model is then used to predict the grades and ranks of the ninth examination. The predicted grades are compared with the real grades (for testing) in Table 5. _grade_ denotes the predicted subject grades of student 14295, which is a floating-point type. We ceil the floating-point predicted grade to integer, because the rank and grade are usually integral types. Therefore, the predicted maths grade (85.2500, 86) means the graph neural network's output is 85.2500, then we ceil 85.2500 to 86. _grade_ represents the real grade of the ninth examination used for test. The maths grade of the ninth examination is 86, as shown in Table 5. Likewise, the predicted rank and real rank are denoted in the same way. We can use the relative error as an indicator to inspect the personalized grade prediction performance. For every subject prediction, only the geography grade is predicted with a point error of 1. The real grade is 46, but the predicted grade is 47. The relative error is 1/46. Three subject ranks (maths, chemistry, and geography) all have a rank error of 1. The predicted rank of maths is 12, but the real rank is 13. The predicted rank of chemistry is 16, but the real rank is 15.