Machine-Learning Prediction of Major Depressive Symptoms from Rumination, Sleep Quality, Perceived Stress, and Social Support Using Random Forest Classification

Authors

Keywords:

Major depressive symptoms, machine learning, Random Forest, rumination, sleep quality, perceived stress, social support, depression prediction

Abstract

Objective: This study aimed to evaluate the ability of a Random Forest classification model to predict clinically significant major depressive symptoms among Canadian adults using rumination, sleep quality, perceived stress, and perceived social support as predictor variables.

Methods and Materials: This cross-sectional predictive study included 684 adults residing in Canada who completed standardized measures of depressive symptoms, rumination, sleep quality, perceived stress, and perceived social support. Clinically significant depressive symptoms were defined using a Patient Health Questionnaire-9 score of 10 or higher. Rumination was assessed using the Ruminative Responses Scale, sleep quality using the Pittsburgh Sleep Quality Index, perceived stress using the Perceived Stress Scale-10, and social support using the Multidimensional Scale of Perceived Social Support. The dataset was divided using stratified random sampling into a training set of 547 participants and an independent test set of 137 participants. Random Forest hyperparameters were optimized using stratified five-fold cross-validation. Model performance was evaluated using accuracy, sensitivity, specificity, precision, F1 score, and receiver operating characteristic area under the curve. Permutation importance and SHapley Additive exPlanations were used to interpret predictor contributions.

Findings: The optimized model achieved a mean cross-validated ROC-AUC of .896 and demonstrated strong generalization in the independent test set, with accuracy of .847, sensitivity of .827, specificity of .859, precision of .782, F1 score of .804, and ROC-AUC of .901. Perceived stress showed the greatest predictive importance, followed by rumination, poor sleep quality, and perceived social support. Higher perceived stress, greater rumination, and poorer sleep quality increased the predicted probability of clinically significant depressive symptoms, whereas stronger social support decreased that probability.

Conclusion: A parsimonious Random Forest model based on four modifiable psychosocial variables demonstrated strong discrimination of clinically significant depressive symptoms, supporting the potential value of interpretable machine-learning approaches for depression risk screening and decision support.

Downloads

Download data is not yet available.

References

Almulla, A. A., & Khasawneh, M. A. S. (2026). Prediction and Prevalence of Depression and Anxiety in Young Adults With Specific Learning Disorders: A Machine Learning Approach in Saudi Arabia. Clinical Psychology & Psychotherapy, 33(1). https://doi.org/10.1002/cpp.70221

Angel, V. d., Lewis, S., Munir, S., Matcham, F., Dobson, R., & Hotopf, M. (2022). Using Digital Health Tools for the Remote Assessment of Treatment Prognosis in Depression (RAPID): A Study Protocol for a Feasibility Study. BMJ open, 12(5), e059258. https://doi.org/10.1136/bmjopen-2021-059258

Bailey, B., & Strunk, D. R. (2023). Predicting Anxiety and Depression Over 12 Months of the COVID‐19 Pandemic: A Machine Learning Study. Journal of Clinical Psychology, 79(10), 2388-2403. https://doi.org/10.1002/jclp.23555

Chen, P. Y. (2023). Distorted Cognitive Process in Major Depressive Disorder and Relevant Interventions. Journal of Education Humanities and Social Sciences, 22, 277-281. https://doi.org/10.54097/ehss.v22i.12435

Ciobotaru, D., Nguyen, V. T., Pérez, A., Clothier, Z., Violante, I. R., Cropley, M., & Kadosh, R. C. (2026). Feasibility and Effectiveness of Personalized Home‐Based Neurostimulation for Teachers Experiencing Work‐Related Rumination. Brain and Behavior, 16(2). https://doi.org/10.1002/brb3.71264

Coenen, T., Maerevoet, M., Chen, S., Brouwer, M. D., Hoecke, S. V., Koster, E. H. W., Abeele, M. V., & Bombeke, K. (2025). Requirements and Concerns of Individuals Remitted From Depression for an Early Relapse Detection mHealth App: Focus Group Study. Jmir Mhealth and Uhealth, 13, e67141. https://doi.org/10.2196/67141

Cosenzo, L. G., & Alcántara, C. (2026). Examining the Indirect Effects of Acculturation Stress on Insomnia Through Rumination and Alcohol Use Among Latinx Women and Men. Cultural diversity & ethnic minority psychology, 32(1), 96-106. https://doi.org/10.1037/cdp0000723

Cywiak, V., Solt, I., Givon‐Benjio, N., Fruchter, E., & Okon‐Singer, H. (2025). Cognitive Biases: Potential Behavioral Marker for Future Development of Postpartum Depression and Childbirth-Related Post-Traumatic Stress Disorder. Frontiers in Psychiatry, 16. https://doi.org/10.3389/fpsyt.2025.1650453

dethoor, m., vialatte, f., martinelli, m., peri, p., lançon, c., & Trousselard, M. (2022). Predictive Factors of Response to Mindfulness-Based Cognitive Therapy (Mbct) for Patients With Depressive Symptoms: The Machine Learning’s Point of View. Obm Integrative and Complementary Medicine, 07(04), 1-31. https://doi.org/10.21926/obm.icm.2204058

Everaert, J., Benisty, H., Polack, R. G., Joormann, J., & Mishne, G. (2022). Which Features of Repetitive Negative Thinking and Positive Reappraisal Predict Depression? An in-Depth Investigation Using Artificial Neural Networks With Feature Selection. Journal of Psychopathology and Clinical Science, 131(7), 754-768. https://doi.org/10.1037/abn0000775

Ferris, C. F. (2026). Filtering the Noise: A Cerebellar-Centered Framework for Understanding and Treating Mental Illness -a Paradigm Shift in Psychiatry. Frontiers in Psychiatry, 17. https://doi.org/10.3389/fpsyt.2026.1772265

Fredrick, J. W., Nagle, K., Langberg, J. M., Dvorsky, M. R., Breaux, R., & Becker, S. P. (2022). Rumination as a Mechanism of the Longitudinal Association Between COVID-19-Related Stress and Internalizing Symptoms in Adolescents. Child Psychiatry & Human Development, 55(2), 531-540. https://doi.org/10.1007/s10578-022-01435-3

Ganai, U. J., Sachdev, S., & Bhushan, B. (2024). Predictive Modelling of Stress, Anxiety and Depression: A Network Analysis and Machine Learning Study. British Journal of Clinical Psychology, 63(4), 522-542. https://doi.org/10.1111/bjc.12487

Geng, S., Wang, J., Xia, Y., Niu, B., Deng, X., & Wu, X. (2025). Predicting Generalized Anxiety Disorder Among Chinese Depressed Adolescents: An Explainable Machine Learning Approach. BMC Medical Informatics and Decision Making, 25(1). https://doi.org/10.1186/s12911-025-03225-y

Genugten, C. v., Thong, M. S. Y., Ballegooijen, W. v., Kleiboer, A., Spruijt‐Metz, D., Smit, A. C., Sprangers, M. A. G., Terhorst, Y., & Riper, H. (2025). Beyond the Current State of Just-in-Time Adaptive Interventions in Mental Health: A Qualitative Systematic Review. Frontiers in Digital Health, 7. https://doi.org/10.3389/fdgth.2025.1460167

Gopalakrishnan, A., Gururajan, R., Venkataraman, R., Zhou, X., Saravanan, A., & Sen, M. (2023). Attribute Selection Hybrid Network Model for Risk Factors Analysis of Postpartum Depression Using Social Media. Brain Informatics, 10(1). https://doi.org/10.1186/s40708-023-00206-7

Guo, T., Zhang, Z., Taylor, A., Hall, D. L., Yeung, A., Kramer, A. F., & Zou, L. (2022). Association of Social Support With Negative Emotions Among Chinese Adolescents During Omicron-Related Lockdown of Shenzhen City: The Roles of Rumination and Sleep Quality. Frontiers in Psychiatry, 13. https://doi.org/10.3389/fpsyt.2022.957382

Hart, A., Reis, D., Prestele, E., & Jacobson, N. C. (2022). Using Smartphone Sensor Paradata and Personalized Machine Learning Models to Infer Participants’ Well-Being: Ecological Momentary Assessment. Journal of medical Internet research, 24(4), e34015. https://doi.org/10.2196/34015

Hitchcock, P., Fried, E. I., & Frank, M. J. (2022). Computational Psychiatry Needs Time and Context. Annual review of psychology, 73(1), 243-270. https://doi.org/10.1146/annurev-psych-021621-124910

Höller, Y., Urbschat, M. M., Kristófersson, G. K., & Olafsson, R. (2022). Predictability of Seasonal Mood Fluctuations Based on Self-Report Questionnaires and EEG Biomarkers in a Non-Clinical Sample. Frontiers in Psychiatry, 13. https://doi.org/10.3389/fpsyt.2022.870079

Jiang, T. (2026). Key Factors and Serial Mediation Analysis of Anxiety and Depression Among University Students: A Cross-Sectional Study. Frontiers in Psychiatry, 17. https://doi.org/10.3389/fpsyt.2026.1809332

Kim, S. S., Gil, M., & Min, E. J. (2023). Machine Learning Models for Predicting Depression in Korean Young Employees. Frontiers in Public Health, 11. https://doi.org/10.3389/fpubh.2023.1201054

Laicher, H., Int-Veen, I., Woloszyn, L., Wiegand, A., Kroczek, A., Sippel, D., Lawyer, G., Torka, F., Nieratschker, V., Rubel, J., Fallgatter, A. J., Ehlis, A. C., & Rosenbaum, D. (2025). Temporal Dynamics of CBT Emotion Regulation Training in Patients With Major Depression Using Ecological Momentary Assessment. Scientific reports, 15(1). https://doi.org/10.1038/s41598-025-16344-3

Li, L. Y., Zhang, S., & Fan, W. (2025). Machine Learning-Based Prediction Model and Key Determinants of Adolescent Depression in China: A Multicenter Cross-Sectional Study. https://doi.org/10.21203/rs.3.rs-6887876/v1

Li, X. I. A., Wang, J., & Singh, P. S. J. (2026). Life-Course Trauma Subtypes, Depressive Burden, and Cognitive Vulnerability in Middle-Aged and Older Chinese Adults. https://doi.org/10.21203/rs.3.rs-9811713/v1

Maatoug, R., Oudin, A., Adrien, V., Saudreau, B., Bonnot, O., Millet, B., Ferreri, F., Mouchabac, S., & Bourla, A. (2022). Digital Phenotype of Mood Disorders: A Conceptual and Critical Review. Frontiers in Psychiatry, 13. https://doi.org/10.3389/fpsyt.2022.895860

Magal, N., Rab, S. L., Goldstein, P., Simon, L., Jiryis, T., & Admon, R. (2022). Predicting Chronic Stress Among Healthy Females Using Daily-Life Physiological and Lifestyle Features From Wearable Sensors. Chronic Stress, 6. https://doi.org/10.1177/24705470221100987

McHugh, C., Ho, N., Iorfino, F., Crouse, J. J., Nichles, A., Zmicerevska, N., Scott, E., & Hickie, I. B. (2023). Predictive Modelling of Deliberate Self-Harm and Suicide Attempts in Young People Accessing Primary Care: A Machine Learning Analysis of a Longitudinal Study. Social Psychiatry and Psychiatric Epidemiology, 58(6), 893-905. https://doi.org/10.1007/s00127-022-02415-7

Mojsa‐Kaja, J., & Ivčević, Z. (2022). Emotion Regulation Strategies and Mental Health Symptoms During COVID-19: The Mediating Role of Insomnia. International Journal of Occupational Medicine and Environmental Health, 36(1), 151-159. https://doi.org/10.13075/ijomeh.1896.01977

Tallón, P., Zorrilla, A. M., & Reichert, M. (2025). Computational Strategies for Depression Detection and Treatment: The Role of Behavioral Activation and Neurobiological Insights – A Systematic Review. https://doi.org/10.1101/2025.03.27.25324813

Tariq, A., Gray, E., Gregory, A. M., & Chan, S. W. Y. (2025a). Emotional Vulnerability in Adolescents (EVA) Longitudinal Study: Identifying Individual Differences in Symptoms of Adolescent Depression and Anxiety and Their Biopsychosocial Mechanisms Based on Demographic and Mental Health Characteristics. Wellcome Open Research, 9, 510. https://doi.org/10.12688/wellcomeopenres.22685.2

Tariq, A., Gray, E., Gregory, A. M., & Chan, S. W. Y. (2025b). Emotional Vulnerability in Adolescents (EVA) Study: Identifying Potential Biopsychosocial Markers for Adolescent Depressive Symptoms and Well‐Being. Mental Health Science, 3(2). https://doi.org/10.1002/mhs2.70010

Wang, L., Zhou, N., Jaffe, N., Pidvirny, K., Tierney, A. O., Fisher, H., Morfini, F., Forbes, E. E., Pizzagalli, D. A., Cai, T., & Webb, C. A. (2025). Multimodal Prediction of Future Depressive Symptoms in Adolescents. BMC psychiatry, 26(1). https://doi.org/10.1186/s12888-025-07665-8

Wang, Y., Guang, Z., Zhang, J., Han, L., Zhang, R., Chen, Y. C., Chen, Q., Liu, Z., Gao, Y., Wu, R., & Wang, S. (2023). Effect of Sleep Quality on Anxiety and Depression Symptoms Among College Students in China’s Xizang Region: The Mediating Effect of Cognitive Emotion Regulation. Behavioral Sciences, 13(10), 861. https://doi.org/10.3390/bs13100861

Watkins, E., Phillips, D., Choueiri, H., Ford, A., Cook, H. T., Taylor, G., & Kessler, R. C. (2025). A Randomized Controlled Trial of Internet-Delivered Guided and Unguided Cognitive Behaviour Therapy for Treating Depression and Anxiety in UK University Students: Study Protocol for the Nurture-U Internet CBT Trial. Trials, 26(1). https://doi.org/10.1186/s13063-025-09023-1

Wen, A., Wolitzky‐Taylor, K., Gibbons, R. D., & Craske, M. G. (2023). A Randomized Controlled Trial on Using Predictive Algorithm to Adapt Level of Psychological Care for Community College Students: STAND Triaging and Adapting to Level of Care Study Protocol. Trials, 24(1). https://doi.org/10.1186/s13063-023-07441-7

Zhou, Y., Pei, C., Yin, H.-L., Zhu, R. T., Yan, N., Wang, L., Zhang, X., Lan, T., Li, J., Zeng, L., & Huo, L. (2024). Predictors of Smartphone Addiction in Adolescents With Depression: Combing the Machine Learning and Moderated Mediation Model Approach. https://doi.org/10.21203/rs.3.rs-5007740/v1

Downloads

Additional Files

Publication Timeline

Published
Submitted
Revised
Accepted

How to Cite

Nikoei Rad , P. ., & Bahram, P. . (2026). Machine-Learning Prediction of Major Depressive Symptoms from Rumination, Sleep Quality, Perceived Stress, and Social Support Using Random Forest Classification. Journal of Assessment and Research in Applied Counseling (JARAC), 8(4), 1-19. https://journals.kmanpub.com/index.php/jarac/article/view/6565