Explainable Ensemble Learning for Depression Risk Classification Using Multidomain Behavioral Features

Authors

  • Erfian Junianto Informatics, Universitas Adhirajasa Reswara Sanjaya, Indonesia
  • Siti Nurkhodijah Information Systems, Universitas Adhirajasa Reswara Sanjaya, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2026.7.2.5009

Keywords:

Behavioral Features, Depression Screening, Explainable Machine Learning, Mental Health, SHAP, XGBoost

Abstract

Depression is a growing global health concern, particularly among adolescents and university students. Despite the availability of standardized assessments, delays in early detection remain a major barrier to effective treatment. Digital behavioral data holds considerable potential for mental health assessment, but its utilization remains limited due to the absence of integrated and interpretable computational models. This study presents an interpretable machine learning framework for classifying depression risk using multi-domain behavioral features extracted from simulated digital life datasets. Three public datasets were integrated and mapped to five psychological clusters based on DSM-5 criteria: self-regulation, negative affect, cognitive strain, comparison and avoidance, and sleep disturbance. Two ensemble classifiers, Random Forest and XGBoost, were applied and evaluated using 10-fold stratified cross-validation. Depression risk was categorized into three levels: Low, Medium, and High. The Random Forest model achieved the highest accuracy (81%) and macro-averaged F1-score (0.81), showing strong performance especially in identifying transitional Medium-risk users. To enhance transparency, both global and local model interpretations were performed using SHapley Additive exPlanations (SHAP). Results revealed that digital stressors such as excessive screen time and disrupted sleep patterns were prominent in high-risk classifications, while mood stability and mindfulness were protective factors in low-risk groups. The proposed framework offers a scalable and explainable for early depression screening by integrating psychological theory with artificial intelligence methods. The findings contribute to the field of behavioral informatics by demonstrating the practical value of interpretable models in enhancing the reliability, transparency, and applicability of digital mental health systems and personalized behavioral monitoring.

Downloads

Download data is not yet available.

References

World Health Organization, “Depressive Disorder (Depression),” 2023. Accessed: Apr. 10, 2025. [Online]. Available: Https://Www.Who.Int/News-Room/Fact-Sheets/Detail/Depression

Kemenkes, “Profil Kesehatan Indonesia 2023.” Accessed: Apr. 10, 2025. [Online]. Available: Https://Kemkes.Go.Id/Id/Profil-Kesehatan-Indonesia-2023

I. H. Sarker, “Machine Learning: Algorithms, Real-World Applications And Research Directions,” Sn Comput. Sci., Vol. 2, No. 3, P. 160, 2021, Doi: 10.1007/S42979-021-00592-X.

H. Byeon, “Advances In Machine Learning And Explainable Artificial Intelligence For Depression Prediction,” Int. J. Adv. Comput. Sci. Appl., Vol. 14, Pp. 520–526, Jul. 2023, Doi: 10.14569/Ijacsa.2023.0140656.

S. M. Lundberg And S.-I. Lee, “A Unified Approach To Interpreting Model Predictions,” In Advances In Neural Information Processing Systems, 2017, Pp. 4765–4774. Doi: 10.48550/Arxiv.1705.07874.

D. C. Mohr, M. Zhang, And S. M. Schueller, “Personal Sensing: Understanding Mental Health Using Ubiquitous Sensors And Machine Learning,” Annu. Rev. Clin. Psychol., Vol. 13, No. Volume 13, 2017, Pp. 23–47, 2017, Doi: 10.1146/Annurev-Clinpsy-032816-044949.

C. S. Andreassen, “Online Social Network Site Addiction: A Comprehensive Review,” Curr. Addict. Reports, Vol. 2, No. 2, Pp. 175–184, 2015, Doi: 10.1007/S40429-015-0056-9.

M. B. First, Dsm-5-Tr®Handbook Of Differential Diagnosis. Washington, Dc: American Psychiatric Publishing, 2024.

K. Opoku Asare, Y. Terhorst, J. Vega, E. Peltonen, E. Lagerspetz, And D. Ferreira, “Predicting Depression From Smartphone Behavioral Markers Using Machine Learning Methods, Hyperparameter Optimization, And Feature Importance Analysis: Exploratory Study,” Jmir Mhealth Uhealth, Vol. 9, No. 7, P. E26540, Jul. 2021, Doi: 10.2196/26540.

D. Imans, T. Abuhmed, M. Alharbi, And S. El-Sappagh, “Explainable Multi-Layer Dynamic Ensemble Framework Optimized For Depression Detection And Severity Assessment,” Diagnostics, Vol. 14, No. 21, 2024, Doi: 10.3390/Diagnostics14212385.

M. H. Amirhosseini, A. L. Ayodele, And A. Karami, “Prediction Of Depression Severity And Personalised Risk Factors Using Machine Learning On Multimodal Data,” In 2024 Ieee 12th International Conference On Intelligent Systems (Is), 2024, Pp. 1–7. Doi: 10.1109/Is61756.2024.10705185.

J. Liu And M. Shi, “A Hybrid Feature Selection And Ensemble Approach To Identify Depressed Users In Online Social Media,” Front. Psychol., Vol. Volume 12, 2022, Doi: 10.3389/Fpsyg.2021.802821.

S. Li, Y. Xiao, And S. Hu, “A Depression Detection Method Based On Multi-Modal Feature Fusion Using Cross-Attention,” In 2025 8th International Conference On Advanced Algorithms And Control Engineering (Icaace), 2025, Pp. 1825–1831. Doi: 10.1109/Icaace65325.2025.11019096.

Khushi Yadav, “Impact Of Screen Time On Mental Health,” Kaggle. Accessed: May 02, 2025. [Online]. Available: Https://Www.Kaggle.Com/Datasets/Khushikyad001/Impact-Of-Screen-Time-On-Mental-Health

Shahzad Aslam, “Social Media Menace,” Kaggle. Accessed: May 02, 2025. [Online]. Available: Https://Www.Kaggle.Com/Datasets/Zeesolver/Dark-Web

Souvik Ahmed, “Social Media And Mental Health,” Kaggle. Accessed: May 02, 2025. [Online]. Available: Https://Www.Kaggle.Com/Datasets/Souvikahmed071/Social-Media-And-Mental-Health

K. Kroenke, R. L. Spitzer, And J. B. W. Williams, “The Phq-9,” J. Gen. Intern. Med., Vol. 16, No. 9, Pp. 606–613, 2001, Doi: Https://Doi.Org/10.1046/J.1525-1497.2001.016009606.X.

D. Liu, Z. Chen, W. Marrero, N. Jacobson, And T. Thesen, “Explainable Machine Learning-Based Prediction Of Depression Severity In Medical Students,” Medrxiv, 2023, Doi: 10.1101/2023.12.14.23299975.

Z. I. Bimawan, T. Astuti, And P. Arsi, “Comparison Of Random Forest, K-Nearest Neighbor, Decision Tree, And Xgboost Algorithms For Detecting Stunting In Toddlers,” J. Tek. Inform., Vol. 5, No. 6, Pp. 1599–1607, 2024, Doi: 10.52436/1.Jutif.2024.5.6.2629.

P. Elisa And A. R. Isnain, “Comparison Of Random Forest, Support Vector Machine And Naive Bayes Algorithms To Analyze Sentiment Towards Mental Health Stigma,” J. Tek. Inform., Vol. 5, No. 1, Pp. 321–329, 2024, Doi: 10.52436/1.Jutif.2024.5.1.1817.

L. Breiman, “Random Forests,” Mach. Learn., Vol. 45, No. 1, Pp. 5–32, 2001, Doi: 10.1023/A:1010933404324.

A. Salman, H. A., Kalakech, A., & Steiti, “Random Forest Algorithm Overview,” Babylonian J. Mach. Learn., Vol. 2024, Pp. 69–79, 2024, Doi: 10.58496/Bjml/2024/007.

M. Nalluri, M. Pentela, And N. R. Eluri, “A Scalable Tree Boosting System: Xg Boost,” Int. J. Res. Stud. Sci. Eng. Technol, Vol. 7, No. 12, Pp. 36–51, 2020, Doi: 10.22259/2349-476x.0712005.

T. Chen And C. Guestrin, “Xgboost: A Scalable Tree Boosting System,” In Proceedings Of The Acm Sigkdd International Conference On Knowledge Discovery And Data Mining, 2016. Doi: 10.1145/2939672.2939785.

Y. Xu And R. Goodacre, “On Splitting Training And Validation Set: A Comparative Study Of Cross-Validation, Bootstrap And Systematic Sampling For Estimating The Generalization Performance Of Supervised Learning,” J. Anal. Test., Vol. 2, No. 3, Pp. 249–262, 2018, Doi: 10.1007/S41664-018-0068-2/Figures/9.

S. Farhadpour, T. A. Warner, And A. E. Maxwell, “Selecting And Interpreting Multiclass Loss And Accuracy Assessment Metrics For Classifications With Class Imbalance: Guidance And Best Practices,” Remote Sens., Vol. 16, No. 3, 2024, Doi: 10.3390/Rs16030533.

Arunraju Chinnaraju, “Explainable Ai (Xai) For Trustworthy And Transparent Decision-Making: A Theoretical Framework For Ai Interpretability,” World J. Adv. Eng. Technol. Sci., Vol. 14, No. 3, Pp. 170–207, Mar. 2025, Doi: 10.30574/Wjaets.2025.14.3.0106.

J. M. Twenge And W. K. Campbell, “Associations Between Screen Time And Lower Psychological Well-Being Among Children And Adolescents: Evidence From A Population-Based Study,” Prev. Med. Reports, Vol. 12, Pp. 271–283, 2018, Doi: Https://Doi.Org/10.1016/J.Pmedr.2018.10.003.

B. Keles, M. Niall, And A. And Grealish, “A Systematic Review: The Influence Of Social Media On Depression, Anxiety And Psychological Distress In Adolescents,” Int. J. Adolesc. Youth, Vol. 25, No. 1, Pp. 79–93, Dec. 2020, Doi: 10.1080/02673843.2019.1590851.

H. Appel, A. L. Gerlach, And J. Crusius, “The Interplay Between Facebook Use, Social Comparison, Envy, And Depression,” Curr. Opin. Psychol., Vol. 9, Pp. 44–49, 2016, Doi: 10.1016/J.Copsyc.2015.10.006.

A. Mamede, I. Merkelbach, G. Noordzij, And S. Denktas, “Mindfulness As A Protective Factor Against Depression, Anxiety And Psychological Distress During The Covid-19 Pandemic: Emotion Regulation And Insomnia Symptoms As Mediators,” Front. Psychol., Vol. Volume 13-2022, 2022, Doi: 10.3389/Fpsyg.2022.820959.

C.-H. Tsai, M. Christian, Y.-Y. Kuo, C. C. Lu, F. Lai, And W.-L. Huang, “Sleep, Physical Activity And Panic Attacks: A Two-Year Prospective Cohort Study Using Smartwatches, Deep Learning And An Explainable Artificial Intelligence Model.,” Sleep Med., Vol. 114, Pp. 55–63, Feb. 2024, Doi: 10.1016/J.Sleep.2023.12.013.

G. D. Price, M. V Heinz, S. H. Song, M. D. Nemesure, And N. C. Jacobson, “Using Digital Phenotyping To Capture Depression Symptom Variability: Detecting Naturalistic Variability In Depression Symptoms Across One Year Using Passively Collected Wearable Movement And Sleep Data,” Transl. Psychiatry, Vol. 13, No. 1, P. 381, 2023, Doi: 10.1038/S41398-023-02669-Y.

S. Jafarlou Et Al., “Objective Monitoring Of Loneliness Levels Using Smart Devices: A Multi-Device Approach For Mental Health Applications,” Plos One, Vol. 19, Jun. 2024, Doi: 10.1371/Journal.Pone.0298949.

S. C. E. Nouis, V. Uren, And S. Jariwala, “Evaluating Accountability, Transparency, And Bias In Ai-Assisted Healthcare Decision- Making: A Qualitative Study Of Healthcare Professionals’ Perspectives In The Uk,” Bmc Med. Ethics, Vol. 26, No. 1, P. 89, 2025, Doi: 10.1186/S12910-025-01243-Z.

Additional Files

Published

2026-04-15

How to Cite

[1]
E. Junianto and S. Nurkhodijah, “Explainable Ensemble Learning for Depression Risk Classification Using Multidomain Behavioral Features”, J. Tek. Inform. (JUTIF), vol. 7, no. 2, pp. 778–792, Apr. 2026.