Analysis of Stacking Ensemble Method in Machine Learning Algorithms to Predict Student Depression - Levina, Naouthla Asia; Rahardi , Majid (Politeknik Negeri Batam, 2025)
Mental health issues, particularly depression among university students, require early detection and intervention due to their profound impact on academic performance and overall well-being. Although machine learning has been utilized in previous studies to predict depression, most research still relies on single-model approaches and rarely employs publicly available datasets that have undergone comprehensive preprocessing. This study aims to develop a depression prediction model for university students using a two-level stacking ensemble technique with cross-validation stacking, integrating Random Forest, Gradient Boosting, and XGBoost as base learners, and Logistic Regression as the meta-learner. A public dataset from Kaggle was utilized, consisting of 502 student records and 10 multidimensional predictor variables. Data preprocessing included cleaning, feature encoding, and standardization. Model performance was evaluated using accuracy, precision, recall, F1-score, and ROC-AUC metrics. The proposed stacking ensemble model achieved excellent performance, with an accuracy of 98.02%, ROC-AUC of 99.8%, precision of 96%, recall of 100%, and an F1-score of 98% for the depression class. These results demonstrate that the stacking ensemble method is highly effective for early depression detection among university students and has strong potential for implementation as a decision-support tool in academic environments.