# SDA-Vis: A Visualization System for Student Dropout Analysis Based on Counterfactual Exploration
## 4 SDA-Vis: Visual Design and Overview
Therefore, we compute a set of counterfactuals for each student containing information on which attributes and values of one or more students should be changed in order to reduce their probabilities of becoming dropout students (AO3). Once a group of interest is selected in the SP view, our CP view displays all of the counterfactuals associated with this selection, as shown in Figure 3**. ** Furthermore, the analyst can freely choose a set of counterfactuals to inspect using the view described in the following subsection. Both views may be considered complementary in this analysis. Additionally, we provide three different ways to map the data onto the design space. The first approach uses the probability that a student will be classified as a dropout. Figure 4 illustrates how this approach maps the possibilities. The left region represents the SP view, and the right is the CP view. They are divided by a line that represents the decision boundary (classification model threshold). For our purposes, we set this boundary by default at 0.5 and use the corresponding probability value for each student--resulting from the classification model employed--to assign a corresponding value on the horizontal axis. As can be seen, the SP view ranges from 0 to 0.49 (dropout students), and the CP view ranges from 0.5 to 1 (non-dropout students). For the vertical axis, the analyst can choose one of three different metrics, i.e., _Feasibility (Fe), Factibility (Fa)_, and _Probability (Pr)_, calculated as follows:  
\[Fe(x^{\prime}) = d(x^{\prime},x), \tag{4}\] \[Fa(x^{\prime}) = min\_d(x^{\prime},Z),\] (5) \[Pr(x^{\prime}) = Prob[y^{\prime}=1]=\frac{1}{1+e^{-y^{\prime}}}, \tag{6}\]  
where \(d\) is the Euclidean distance, \(min\_d\) is the minimal distance between a counterfactual (\(x^{\prime}\)) and original set of instances (\(Z\)), and _Prob_ is the probability. _Feasibility_ indicates the Euclidean distance between the counterfactual and the original instance it is associated with. _Factibility_ refers to the distance between the counterfactual and the nearest non-dropout student in the original space. _Probability_ is defined by the model as the non-dropout probability membership of the student. For instance, we display a student labeled as \"A\" in the SP view (Figure 4) and their corresponding \(C_{1}^{A}\) to \(C_{5}^{A}\) counterfactuals in the CP view. Our second approach makes use of the _y-axis_ scale of the SP view, while the _x-axis_ is defined by the probability. We use this to offer the analyst a similarity-based data map based on different metrics and outliers, and multiple patterns. The analyst can alternate between different metrics on the _y-axis_ by clicking on the combo-box buttons located at the top of each view. For instance, Figure 3**,**. **5** employ the probability on both axes. **Counterfactual Exploration view. ** Once a targeted subset of counterfactuals has been identified, it is necessary to explore in detail how these are composed. Our system implements a widget to understand clearly what the counterfactuals are saying. This view, depicted in Figure 3**, relies on a matrix representation comprising a set of blocks, with each block corresponding to a student and their counterfactuals. Figure 5 shows an example of a block. The first row (light-green background) displays the original values for each attribute. At the same time, the line (C1-C5) represents the computed counterfactual of a student. Note that we have included the value and highlighted (red background) the specific characteristic that the counterfactuals suggest modifying. For instance, the counterfactual C1 suggests supporting the student to improve the grade for _Elective_GPA_ (GPA from elective courses) from 11 to 13 (0-20 scale). In contrast, C4 suggests that socioeconomic variables play an important role in avoiding dropout for a student. Therefore, C4 suggests increasing _O_IDH_ (origin IDH) from 76% to 81% and reducing _R_Poverty_Per_ (residence poverty percentage) from 6% to 1%.