Depression is a significant mental health issue and early recognition of those who are vulnerable may aid in timely intervention. In this study, an explainable machine learning framework for predicting depression risk based on demographic, socioeconomic, behavioral, clinical, examination and laboratory variables is presented. The data was also preprocessed and selected using feature selection techniques and class imbalance was corrected from the training set with SMOTEENN. Nine machine learning models were evaluated, including Logistic Regression, Decision Tree, Random Forest, K-Nearest Neighbors, Support Vector Machine, Naïve Bayes, Extra Trees, Gradient Boosting, and XGBoost. Overall, XGBoost performed best, with an accuracy of 82.60% and a ROC-AUC of 0.760. To make the model more interpretable and to find influential factors related to the depression risk, SHapley Additive exPlanations (SHAP) was used. The framework offers global and local explanations, making predictions more transparent. The results suggest that effective predictive modeling coupled with EAI can be used to facilitate a more reliable and interpretable evaluation of depression risk and could be part of future healthcare decision-support systems.
