## 3 Method  
### Representation of an Online Learning Activity Sequence  
In this section, we propose a representation of the learning activity sequence, and the results can be used as the input for a deep neural network. This method can be used to represent the whole or partial sequence of online learning activities of learners, which is beneficial for predicting learners' performance as early as possible, rather than generating statistical features of online learning behavior only after the online course ends. There are \(m\) students _S = {s\({}_{1}\), s\({}_{2}\),..., s\({}_{m}\)}_. The online learning process is divided into \(n\) phases according to durations such as hours, days, or weeks, or according to different modules of the course _P = {p\({}_{1}\), p\({}_{2}\),..., p\({}_{n}\)}_. A collection of \(c\) online learning activities that we observe is _A = {a\({}_{1}\), a\({}_{2}\),..., a\({}_{c}\)_}. We represent the sequence of learning activities of all students as a three-dimensional tensor \(R^{m\times n\times c}\), and element \(r_{i,j,k}\) in \(R\) represents the weight of learning activity \(a_{k}\) attended by student \(s_{i}\) in phase \(p_{j}\). The weight can be the time spent, the number of clicks or the scores obtained by a student on this learning activity recorded by the online learning system.  
\begin{table}
\begin{tabular}{l l l l l} \hline
**Ref.** & **Data Sources** & **Features** & **Machine Learning Model** & **Evaluation** \\ \hline
[5] & Blended courses & 21 features of learning behavior & RF & Accuracy: 0.49 \\
[6] & MOOC & 16 features of watching videos & FNN & MAE: 6.8 \\
[7] & SPOC & Not specifically indicated & ECOC & Accuracy: 0.8 \\
[21] & MOOC & 8 features of learning behavior & DT & Accuracy: 0.7 \\
[22] & Blended courses & 19 features of learning behavior & LR & Accuracy: 0.95 \\
[23] & Online short course & 3 features of content & SVM & Accuracy: 0.89 \\  & & 10 features of learning behavior & AUC: 0.8 \\  & & 4 features of students & & AUC: 0.66 \\
[24] & Online question library & 6 features of questions & GNN & Accuracy: 0.66 \\  & & 12 features of mouse movement & & \\
[25] & LMS & 5 features of students & BiLSTM & Accuracy: 0.8 \\
[26] & LMS & Sequence of student grade records & CNN with attention & Accuracy: 0.85 \\
[27] & LMS & 8 features of learning behavior & FNN & Accuracy: 0.8 \\
[28] & OULA & 54 features of learning behavior & FNN with SVD & Accuracy: 0.86 \\ \hline \end{tabular}
\end{table}
Table 1: Comparison of related works.  
We use an example to explain this representation in detail. Table 2 contains some sample logs of students' learning behaviors recorded by the learning management system, including the duration of two students' three learning activities in two days. We take the duration directly as the weight of this activity. The sequence of these students' online learning activities can be represented by a three-dimensional tensor, as shown in Figure 0(a).  
As can be seen from Figure 0(a), the representation of a student's learning activities in a phase is similar to the representation of Bag Of Word (BOW) [33], which is based on the assumption that there is no significant difference between different students' activity sequences in a phase. For the activities in which students do not participate in a phase, the representation sets the weight of these activities as 0. In order to avoid the influence of different orders of magnitude on the weights and accelerate the convergence of the deep neural network during the training, we use the Max-Min Value (1) to normalize all weights according to the type of activity. In this example, the weight of activity A1 is [25; 10; 20], and the weight of A2 is [30; 5], while the weight of A3 is [50; 50; 100]. After normalization, the final representation is shown in Figure 0(b).  
\[X^{\prime}=\frac{X-X_{min}}{X_{max}-X_{min}} \tag{1}\]