## 3 Methods
### Prediction Model Based on the LSTM Network  
An LSTM-based model and its derivative models (i.e., CNN-LSTM and Conv-LSTM) were applied in this study. Specifically, the LSTM can be employed to extract temporal patterns in nonlinear time-series data [30]. The LSTM utilized two gates (i.e., forget gate and input gate) to control the value of the cell state \(Y\). The forget gate \(f\) determined the value of the current cell state by retaining the previous cell state, while the input gate \(i\) determined the value of the current cell state by maintaining the network input. First, the forget and the input gates calculated the current input \(x_{t}\), previously hidden state \(h_{t-1}\), weight \(w\), and bias \(b\) using a'sigmoid' activation function \(\gamma\). \[f_{t}=\gamma\Big{(}w_{f}\cdot(h_{t-1},x_{t})+b_{f}\Big{)} \tag{1}\]  
\[i_{t}=\gamma(w_{i}\cdot(h_{t-1},x_{t})+b_{i}) \tag{2}\]  
Next, Equation (3) formulated a new candidate value of cell state \(\widetilde{Y}_{t}\), i.e., calculated using a 'tanh' activation function \(\theta\). Finally, the old cell state \(Y_{t-1}\) was updated to the current cell state \(Y_{t}\) using Equation (4). \[\widetilde{Y}_{t}=\theta(w_{c}\cdot(h_{t-1},x_{t})+b_{c}) \tag{3}\]  
\[Y_{t}=f_{t}\cdot Y_{t-1}+i_{t}\cdot\widetilde{Y}_{t} \tag{4}\]  
Three models, including LR, SVM, and LSTM, were selected as the baseline models for performance comparison because they performed well in time-series data prediction [31; 32]. The goal was to evaluate which model could generate the highest accuracy in classifyingat-risk students in the early week of the semester. The architectures of the LSTM, CNN-LSTM, and Conv-LSTM are depicted in Table 1. The models were constructed using several deep hidden layers (HL) with a number of trainable parameters integrating two main components: feature extraction and predictor. First, the baseline LSTM contained three layers, i.e., an LSTM layer, a dropout layer, and a fully connected network (FCN) or dense layer that propagated the inputs to the outputs. The number of neurons in each layer was equal to the input sample, and the number of outputs was two, representing the categorical label (i.e., \"Fail\" and \"Pass\"). Second, CNN-LSTM consisted of the CNN layer combined with LSTM as feature extraction and the FCN layer as the classifier. The feature extraction module was constructed using two layers of CNN1D, a pooling layer and a flatten layer. The output of the feature extraction module was in one dimension. Then, an LSTM layer (with 16 LSTM cells) was utilized. On the classifier, an FCN layer was employed. Because of the relatively small sample size of educational data (i.e., covering 16 weeks), the more sophisticated deep CNN architecture could not further improve the prediction performance. Thus, this model was proposed with a simplified concept. Third, the design of the Conv-LSTM model was detailed as follows. A feature extraction module was employed using a ConvLSTM2D layer. Subsequently, a flatten layer was applied. Finally, the FCN layer was implemented. This design provided a simple layer construction with a moderate number of parameters while maintaining good accuracy. The inputs of LSTM, CNN-LSTM, and Conv-LSTM models were denoted in the following order \(x\) [\(N\), \(T\), \(c\)], \(x\) [\(N\), \(s\), \(t\), \(c\)], and \(x\) [\(N\), \(s\), \(r\), \(t\), \(c\)], respectively, where \(c\), \(N\), \(T\), \(t\), \(r\), and \(s\) represent the number of features (channels), the number of samples taken by the prediction model to capture the temporal patterns, time-step, subsequence (columns), rows, and the number of samples, respectively. In both CNN-LSTM and Conv-LSTM architectures, the number of sequence data (i.e., time-step \(T\)) was split into subsequence \(t\) using a divider \(s\); hence, \(T=s\times t\). The number of samples \(N\) were 6, 8, 10, 12, and 16, indicating the week-wise data sequence.