## 3 Methodology  
### Dataset and Preprocessing  
This study utilizes the unified UCI Student Performance dataset, created by merging student-mat.csv (395 samples) and student-por.csv (649 samples), resulting in 1044 samples and 33 features. Categorical variables (sex, school, Pstatus, famsize, Medu, and Fedu) were one-hot-encoded using OneHotEncoder (drop='first') to prevent multi-collinearity, with parental education levels treated categorically to capture socioeconomic effects. Numerical features were standardized using StandardScaler.  
To address the class imbalance in the final grade (G3)--with a pass:fail ratio of 1.8:1--the Synthetic Minority Oversampling Technique for Nominal and Continuous features (SMOTE-NC) was employed in combination with a stratified 80/20 train-test split. SMOTE-NC was selected for its ability to handle mixed-type data, outperforming simpler alternatives such as random oversampling and class weighting in our preliminary tests. However, acknowledging the risk of overfitting or synthetic data artifacts, all models were evaluated on a hold-out test set with stratification to ensure valid generalization.  
In line with prior studies and the Portuguese grading system, the final grade (G3) was initially binarized as \"pass\" (G3 \(\geq\) 10) and \"fail\" (G3 \(<\) 10) to facilitate early intervention for at-risk students. Recognizing that this may limit actionable insights, we also conducted a parallel regression analysis (see Section 4.2.1) to predict continuous final grades, thus allowing for more granular, individualized educational recommendations.  
Three machine learning models--logistic regression, Random Forest, and XGBoost--were chosen for their complementary properties, with training performed via 5-fold cross-validation. Fairness was assessed using the AIF360 library, computing demographic parity and Equalized Odds for sensitive attributes (sex, school, Pstatus, famsize, Medu, and Fedu), and sensitivity analysis was performed to examine each attribute's effect on model bias.  
Implementation Details  
All data analysis and model development were conducted in Google Colab, a cloud-based Python environment, using Python 3.10. The following main libraries and versions were used throughout the experiments:  
* pandas (1.5.3) for data processing;
* numpy (1.23.5) for numerical operations;
* scikit-learn (1.2.2) for machine learning and evaluation;  
\begin{table}
\begin{tabular}{l l l l l} \hline
**Study** & **Dataset** & **Model(s)** & **Fairness/XAI** & **Code** \\ \hline [PERSON] \& [PERSON] & & & \\ (2008) [17] & UCI & LR, DT, RF, SVM & None & Yes \\ [PERSON] et al. (2021) [6] & UCI & LR, SVM, NB, RF & None & No \\ [PERSON] et al. & UCI & LR, RF, XGB, MLP & SHAP, fairness & Yes \\ (2025) [24] & Microsoft Showcase & Self-training, YATSI & None & No \\ [PERSON] et al. (2021) [25] & University Dataset & SVM, ANN & None & No \\ [PERSON] et al. (2021) [26] & Multidisciplinary & Deep Neural & None & No \\ [PERSON] et al. (2021) [27] & University & Network & None & No \\  & & XGBoost + SMOTE & & \\ Proposed Method & student-merged.csv & + Adversarial & DP Gap & [TBD] \\  & & Debiasing & & \\ \hline \end{tabular}
\end{table}
Table 1: Representative recent studies on student performance prediction.  
* imblearn (0.10.1) for SMOTE-NC resampling;
* XGBoost (1.7.6) for gradient boosting models;
* AIF360 (0.5.0) for fairness analysis and adversarial debiasing;
* SHAP (0.41.0) and LIME (0.2.0.1) for model explainability.  
All analyses were conducted on Google Colab with access to Google Cloud computational resources (standard virtual machine, 2 CPUs, 13 GB RAM, and no GPU acceleration). All code and processed data are available upon request for reproducibility.