# A Machine Learning Framework for Student Retention Policy Development: A Case Study
## 3 Methodology
### Proposed Framework
#### 3.2.1 Data Pre-Processing and Feature Extraction  
The data preparation process for training the machine learning models consisted of three stages. In the first stage, data including key demographic details and first-year performance of the students was anonymized and extracted from the registration system database. To ensure anonymity, all identifying information was removed, and specific dates in the registration system were generalized to include year and month only. In the second stage, the data were pre-processed to remove extraneous details resulting from the process of compiling data from various modules within the registration system. The data retrieved contained missing values, which were resolved by inserting the mean of the respective feature into numerical fields and using random assignments for categorical data, such as gender. During the third stage, shown as a feature extraction block in Figure 1, all non-numeric data, including registration year, registration date, nationality, gender, faculty, department, high school graduation date, and status, were encoded to prepare the dataset for machine learning classifiers. Furthermore, course registration information was processed to extract academic performance metrics, such as the number of courses passed and failed by the student in the first semester, the number of courses passed and failed by the end of the second semester, and the number of courses the student is currently repeating.  
Table 2 presents the features extracted. As the table shows, 5 features are categorized as demographic information, 7 features are categorized as enrolment, and 5 features are categorized as academic performance information. Demographic features define the student by providing personal and background information of students and are known prior to registration. Enrolment features define a student by providing information related to the timing and the process of student enrolment at the university and are known at the time of registration. Academic performance features are related to students' performance in their courses. Since the aim is to predict the at-risk students, using solely the data available at the registration systems for generating transcripts, information such as course attendance or detailed performance metrics such as letter grades or exam scores are not included. The academic performance features employed in the current study are high-level features that are available at the end of the semester in the transcript or end-of-semester report. As shown in Table 2, the features used in this study are mainly descriptive features such as gender and age, providing factual information on the students. The entry type of the student and scholarship rate may be correlated with the student's prior success and can be considered as predictive features. The features about the number of courses failed can be thought of as diagnostic features representing the struggles of the students. It should be noted that it is possible to use more informative predictive or diagnostic features, such as the entrance exam or evaluation scores or the courses that the students have failed, as such information is also available at the majority of the registration systems, but for this study, a more limited and general set of features was considered.