# An Early Warning System to Detect At-Risk Students in Online Higher Education
## 3 Methods and Context
### Gradual At-Risk Model  
A GAR model is built for each course, and it is composed of a set of predictive models defined as submodels based only on a student's grades during the assessment process. A course has a submodel for each assessment activity, and each submodel uses the grades of the current and previous graded assessment activities as features to produce the prediction. Note that, there is no submodel for the final exam since there is nothing to produce a prediction from when the final score of the course can be computed straightforwardly from the complete set of grades (i.e., the assessment activities and the final exam) by using the final mark formula.  
The prediction outcome for the submodels is to fail the course. This is a binary variable with two possible values: pass or fail. We are interested in predicting whether a student has chances to fail the course, and we denote this causitic as _at-risk student_. Although a global at-risk prediction taking into account all enrolled courses is an interesting outcome, we focus individually on each course to give simple messages and recommendations to the student on courses in which she or he is at-risk.  
**Example 1**.: _Let us describe the GAR model for a course with four Assessment Activities (AA). In such a case, the GAR model contains four submodels:_  
\[\begin{array}{l}\mathit{Pr}_{AA1}(\text{Fail?})=(\text{Grade}_{AA1})\\ \mathit{Pr}_{AA2}(\text{Fail?})=(\text{Grade}_{AA1},\text{Grade}_{AA2})\\ \mathit{Pr}_{AA3}(\text{Fail?})=(\text{Grade}_{AA1},\text{Grade}_{AA2},\text{Grade }_{AA3})\\ \mathit{Pr}_{AA4}(\text{Fail?})=(\text{Grade}_{AA1},\text{Grade}_{AA2},\text{Grade }_{AA3},\text{Grade}_{AAA4})\end{array}\]  
_where \(\mathit{Pr}_{AAn}(\text{Fail?})\) denotes the name of the submodel to predict whether the student will fail the course after the assessment activity \(AAn\). Each submodel \(\mathit{Pr}_{AAn}(\text{Fail?})\) uses the grades (\(\text{Grade}_{AA1},\text{Grade}_{AA2},\ldots,\text{Grade}_{AAn}\)), that is, the grades from the first activity until the activity \(AAn\). Each submodel can be evaluated based on different accuracy metrics. We use four metrics [23]:_  
\[\begin{array}{l}\text{TNR}=\frac{\text{T}N}{\text{T}N+\text{FP}}\qquad \text{ACC}=\frac{\text{TP}+\text{TN}}{\text{TP}+\text{TP}+\text{T}N+\text{ FN}}\\ \text{TPR}=\frac{\text{TP}}{\text{TP}+\text{FN}}\quad\text{F}_{1,5}=\frac{ \left(1+5\right)^{2}\text{TP}}{\left(1+15\right)^{2}\text{TP}+1,5\text{FN}+ \text{FP}}\end{array} \tag{1}\]  
_where TP denotes the number of at-risk students correctly identified, TN the number of non-at-risk students correctly identified, FP the number of at-risk students not correctly identified, and FN the number of non-at-risk students not correctly identified. These four metrics are used for evaluating the global accuracy of the model (ACC), the accuracy when detecting at-risk students (true positive rate--TPR), the accuracy when distinguishing non-at-risk students (true negative rate--TNR) and a harmonic mean of the true positive value (precision) and the TPR (recall) that weights correct at-risk identification (F score - F1,5). Note that, the area under the ROC curve (AUC) is not considered on this study [51]._