Predicting Student Stress Using Machine Learning Ensemble Models: A Multi-Criteria Comparison with Explainable Artificial Intelligence Analysis
Daniel Cristóbal Andrade-Girón, William Joel Marin-Rodriguez, Marcelo Gumercindo Zuñiga-Rojas, Abrahan Cesar Neri-Ayala, Edgar Tito Susanibar-Ramírez, Miguel Angel Aguilar-Luna-Victoria
Student stress is a significant mental health issue in educational settings; therefore, developing reliable, calibrated, and interpretable predictive models can support the classification of observed stress levels. This study analyzed the public Student Stress Factors dataset, comprising 1100 records, 20 predictors, and one target variable, using a supervised machine learning pipeline designed to reduce information leakage. The pipeline included stratified data partitioning, encapsulated preprocessing, nested cross-validation restricted to the training data, and independent holdout evaluation. Nine ensemble and boosting algorithms for tabular data were compared: AdaBoost, Gradient Boosting, Random Forest, Extra Trees, Bagging, Voting, Stacking, XGBoost, and LightGBM. Model performance was assessed using key discrimination and calibration metrics, together with the nonparametric Friedman test for statistical comparison. Gradient Boosting achieved the best average performance in nested cross-validation, with an accuracy of 89.55 ± 3.16%, F1-weighted of 89.54 ± 3.17%, MCC of 0.845 ± 0.047, and ROC-AUC weighted of 98.59 ± 0.92%. XGBoost and LightGBM showed comparable performance. In the independent holdout set, the final calibrated model maintained robust predictive performance, achieving an accuracy of 0.8818, F1-weighted of 0.8818, MCC of 0.8237, and ROC-AUC weighted of 0.9861. Although the overall results indicate stable and high predictive performance, the Friedman test did not identify statistically significant differences among the algorithms, χ2 = 10.953, p = 0.204. Therefore, model selection should consider not only predictive accuracy but also computational efficiency, calibration, interpretability, and implementation feasibility. Despite the internal stability of the pipeline and satisfactory holdout performance, the public and cross-sectional nature of the dataset limits causal inference and model transferability. Consequently, external and prospective validation is required before integration into institutional early warning systems.