# SDA-Vis: A Visualization System for Student Dropout Analysis Based on Counterfactual Exploration
## 5 Case Studies
### Analyzing Counterfactuals on a Specific Group of Students  
In this case study, an assistant in the welfare office wanted to find patterns and alternatives to avoid dropouts in some students. To improve the readability, we will name this assistant Expert_1. He has analyzed students before using different software, but not with a machine-learning-based system. The task is to explore some counterfactuals and how they could help in our scenario. Specifically, Expert_1 aims to use counterfactual explanations to address the following questions. _(i) What are the main characteristics that should be improved to avoid dropping out of students? (ii) What role does the analyst's expertise play?_  
To accomplish this analysis, Expert_1 used SDA-Vis's visual components to select students from one of the most populous programs, Industrial Engineering. Industrial Engineering had about 2000 students, of which about 800 were classified as dropouts, and therefore SDA-Vis generated 4000 counterfactuals (5 for each student). Figure 7 shows the _Dropout Analysis dual view_ of the students and the counterfactuals involved in the analysis. Based on the default presentation of these views (Student Projection view and Counterfactual Projection view), Expert_1 redefined his analysis. He wanted to analyze the students near the threshold line (high probability) and to determine which variables should be improved to prevent dropouts. Using lasso selection, Expert_1 selected students with the highest probability of becoming non-dropouts (highlighted in ), expecting that they would need fewer changes in their original values to become non-dropouts. This selection consisted of 30 students, all predicted as dropouts. Figure 7 shows around 150 counterfactuals (5 for each student). However, Expert_1 noted that the counterfactuals are also sorted by their probabilities, and therefore his analysis focused on certain groups based on their probabilities. Analyzing the counterfactuals, _Counterfactual Exploration view_ (Figure 7) showed that the most relevant variables were linked to _Q_A_Credits_S_ (96%), _Mandatory_GPA_ (20%), _GPA_ (14%), _Scholarship_ (14%), _R_Poverty_Per_ (10%), _Elective_GPA_ (9%), _O_HDI_ (9%), _Q_Courses_S_ (7%), and so on. For instance, the first alternative for the first student (dashed line in ) was to increase the number of approved credits per semester (from 8 to 19) and the quantity of lectures in one semester (from 4 to 6). In the same way, it is possible to analyze all the counterfactuals. However, analyzing each student's counterfactuals individually is a tedious task, and using some organization based on metrics is a better alternative. By simply clicking on the _Feasible_ button, it is possible to re-sort the students and their counterfactuals based on their feasibility. Figure 7 shows the student with the most feasible alternative, suggesting a change in _Q_A_Credits_S_ from 12 to 17 and in _GPA_ from 12 to 15. In the same vein, it is possible to consider counterfactuals based on _Factibility_, as shown in 8. These alternatives made sense to Expert_1, but he wanted to take it one step further; he wanted to analyze how these counterfactuals could affect specific groups. Industrial Engineering is one of the few gender-balanced engineering programs, as can be seen in, and therefore Expert_1 was interested in selecting male and female groups. Expert_1 used the _Table view_, using the pandas queries (_Gender \(==\)\"M\"_ and _Gender \(==\)\"F\"_). In these impact analyses, Expert_1 considered the most feasible and factible counterfactuals. He also selected one counterfactual based on his own expertise (). The _Impact view_ () shows the impact of each selected counterfactual. As shown in Table 3, the most feasible  
Figure 7: Analyzing counterfactual explanations for Industrial Engineering;  represents selection of students and their counterfactuals, respectively,  shows the counterfactuals, where  shows random counterfactuals,  shows the most feasible,  shows the most factible, and  shows the user-selected counterfactual.