Mental health among Generation Z has become an increasing public health concern, while most previous studies have primarily focused on improving classification accuracy without explaining the factors influencing model predictions. This study aimed to identify the factors associated with mental health risk among Generation Z using an Explainable Machine Learning approach. Methods: A quantitative study was conducted using machine learning on data collected from 733 Indonesian Generation Z respondents selected through purposive sampling. Independent variables included demographic characteristics and all questionnaire items from DASS-21, STAI-T, and ACE, while the dependent variable was mental health risk status. Data preprocessing involved feature leakage removal, categorical encoding, missing value imputation, SMOTE-based class balancing, and feature standardization. Logistic Regression, Support Vector Machine, and Random Forest models were developed using hyperparameter optimization with Stratified 5-fold Cross Validation. Model interpretability was performed using SHapley Additive exPlanations (SHAP). Results: Logistic Regression and Support Vector Machine achieved the best performance with 93.6% accuracy, 100% recall, precision above 80%, an F1-score of 0.90, and ROC-AUC greater than 0.99. SHAP analysis identified the twenty most influential predictors, dominated by Adverse Childhood Experiences (45%), followed by DASS-21 (35%), STAI-T (15%), and demographic factors (5%). Conclusion: Logistic Regression was the most appropriate model for identifying mental health risk among Generation Z. Adverse childhood experiences were the strongest predictors, highlighting the importance of integrating early-life experiences into explainable machine learning-based mental health screening systems.
Copyrights © 2026