Journal of Assessment and Research in Applied Counseling
Volume 8, Issue 4, pp 1-19
Machine-Learning Prediction of Major Depressive Symptoms from Rumination, Sleep Quality, Perceived Stress, and Social Support Using Random Forest Classification
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. |
Introduction
Depressive symptoms constitute a major concern for contemporary mental-health research because they emerge through the interaction of cognitive, emotional, behavioral, interpersonal, and contextual processes rather than through a single isolated risk factor. Major depressive disorder is characterized by persistent disturbances in mood, motivation, cognition, sleep, and daily functioning, yet the pathways through which individuals develop clinically significant depressive symptoms are highly heterogeneous. Recent work has increasingly emphasized the need to move beyond single-variable explanations toward multidimensional models capable of identifying combinations of psychological and behavioral characteristics associated with elevated depressive burden. This shift is particularly relevant because individuals with similar levels of one risk factor may differ substantially in their overall vulnerability depending on the presence of other cognitive, social, and lifestyle conditions. Research examining life-course trauma and cognitive vulnerability, for example, illustrates the importance of understanding depressive burden within broader configurations of vulnerability rather than treating depression as the product of one proximal determinant (Li et al., 2026). Similarly, contemporary theoretical developments in psychiatry increasingly conceptualize mental disorders as products of interacting neural, cognitive, and regulatory systems, reinforcing the need for integrative approaches to the study of depressive symptoms (Ferris, 2026).
Among the psychological factors consistently implicated in depression, rumination is especially important because it represents a repetitive style of thinking that can prolong negative affect and interfere with adaptive emotional processing. Rumination generally involves recurrent attention to distress, its perceived causes, and its possible consequences, often without movement toward effective problem solving. Such repetitive negative thinking can maintain attention on adverse emotional material and thereby intensify or prolong depressive experiences. Distorted cognitive processing is widely recognized as an important component of major depressive disorder, and maladaptive patterns of interpretation and repetitive self-focused cognition may contribute to the persistence of depressive states (Chen, 2023). More specifically, artificial neural-network analyses of repetitive negative thinking have shown that particular features of rumination and related cognitive processes can contribute meaningfully to the prediction of depression, supporting the inclusion of rumination in computational models of depressive vulnerability (Everaert et al., 2022). The importance of rumination is also evident longitudinally. In adolescents, rumination has been identified as a mechanism linking stress related to the COVID-19 pandemic with later internalizing symptoms, suggesting that stress exposure may become psychologically consequential partly through repetitive negative thought processes (Fredrick et al., 2022).
The relevance of rumination extends beyond depression alone and appears to connect psychological stress with other domains of functioning that are themselves associated with emotional disorders. Research examining acculturation stress, for example, has investigated rumination as an indirect pathway through which stressful experiences may contribute to insomnia, highlighting the interdependence of repetitive negative thinking and sleep disturbance (Cosenzo & Alcántara, 2026). Experimental and intervention-oriented work likewise reflects increasing interest in rumination as a modifiable target. Personalized home-based neurostimulation has recently been examined in relation to work-related rumination, demonstrating that repetitive negative thinking is sufficiently central to psychological well-being to warrant direct therapeutic targeting (Ciobotaru et al., 2026). Cognitive biases have also been considered potential behavioral markers of subsequent depressive outcomes in vulnerable populations, including postpartum depression, further reinforcing the broader importance of maladaptive information processing in anticipating emotional deterioration (Cywiak et al., 2025). Collectively, these findings suggest that rumination may represent not merely a correlate of depressive symptoms but a potentially informative predictive feature within multivariable classification models.
Sleep quality represents another major domain associated with depressive symptomatology. Sleep and depression are closely intertwined because disturbances in sleep continuity, duration, subjective quality, and daytime functioning can both accompany and potentially exacerbate emotional dysregulation. Poor sleep may reduce cognitive control, increase emotional reactivity, and impair the capacity to manage stressful experiences, while depressive symptoms themselves may contribute to difficulties initiating or maintaining sleep. Research among college students has demonstrated associations between poorer sleep quality and symptoms of both anxiety and depression, with cognitive emotion regulation playing an intermediary role in these relationships (Wang et al., 2023). Insomnia has likewise been identified as an important mechanism connecting emotion-regulation strategies with mental-health symptoms, suggesting that sleep disruption may function as a pathway through which ineffective psychological regulation becomes translated into broader distress (Mojsa‐Kaja & Ivčević, 2022). These findings support treating sleep quality as a central component of predictive models rather than merely as a secondary symptom of depression.
Sleep may be particularly informative when considered jointly with cognitive and social processes. Evidence from adolescents during pandemic-related lockdown conditions has indicated that social support, rumination, sleep quality, and negative emotions are interconnected, highlighting the possibility that depressive vulnerability arises from combined rather than independent influences (Guo et al., 2022). Related work on seasonal mood fluctuations has shown that self-report measures, alongside physiological indicators such as electroencephalographic biomarkers, may provide useful information for predicting changes in mood over time (Höller et al., 2022). The emerging field of digital phenotyping has further emphasized the potential value of behavioral and physiological signals for characterizing mood disorders, while also drawing attention to conceptual and methodological challenges surrounding the translation of passively or digitally assessed behavior into clinically meaningful indicators (Maatoug et al., 2022). Wearable-sensor research similarly demonstrates that daily-life physiological and lifestyle features may contribute to prediction of chronic stress, illustrating the growing relevance of sleep- and behavior-related data to computational mental-health assessment (Magal et al., 2022). Together, this work suggests that sleep quality is embedded in a broader network of psychological and behavioral vulnerability and may provide substantial incremental value in predicting major depressive symptoms.
Perceived stress represents a third theoretically important predictor. Rather than reflecting exposure to a specific event, perceived stress captures the degree to which individuals experience their circumstances as unpredictable, uncontrollable, or overwhelming. This subjective appraisal is particularly relevant to depression because identical external demands may have very different psychological consequences depending on how they are interpreted and managed. Recent research among university students has examined the key factors and mediating pathways associated with anxiety and depression, underscoring the importance of stress-related processes in understanding emotional distress (Jiang, 2026). Predictive modelling studies have also demonstrated the utility of combining network analysis with machine-learning techniques to identify relationships among stress, anxiety, and depression, illustrating that perceived stress may occupy a central position in multivariate models of psychopathology (Ganai et al., 2024). During periods of major environmental disruption, machine-learning research has further shown that depression and anxiety can be predicted over extended intervals from combinations of psychological and contextual variables, reinforcing the value of stress-sensitive predictive approaches (Bailey & Strunk, 2023).
The effect of stress may also depend on how individuals cognitively process and socially regulate stressful experiences. Rumination can amplify and prolong stress responses, whereas access to supportive interpersonal relationships may reduce the psychological consequences of demanding circumstances. Social support is therefore another important candidate predictor of depressive symptoms. Perceived social support reflects an individual's belief that emotional, practical, and relational assistance is available from meaningful others. Such perceived availability may influence coping, reduce loneliness, facilitate adaptive reappraisal, and buffer the effects of adverse experiences. The associations among social support, rumination, sleep quality, and negative emotional states have been demonstrated in contexts of acute social disruption, suggesting that support may exert both direct and indirect effects on emotional well-being (Guo et al., 2022). At the same time, the development of mobile-health applications for individuals remitted from depression has highlighted the importance of monitoring changes that may precede relapse while remaining responsive to users' concerns, preferences, and everyday experiences (Coenen et al., 2025). These developments indicate that social and contextual variables may be valuable components of early-warning and risk-classification systems.
The increasing availability of multidimensional psychological data has contributed to growing use of machine learning in depression research. Conventional regression models remain valuable for testing prespecified associations, but they may be less suited to detecting complex nonlinearities, higher-order interactions, and heterogeneous combinations of risk indicators. Machine-learning algorithms can complement traditional analyses by optimizing out-of-sample prediction and identifying patterns that may not be captured adequately by linear models. Random Forest classification is particularly attractive in this context because it combines multiple decision trees, accommodates nonlinear associations and interactions, is comparatively robust to noise and overfitting, and can generate estimates of feature importance. Recent studies have used machine-learning methods to predict depression in diverse populations, including young employees (Kim et al., 2023), adolescents (Li et al., 2025), and young adults with specific learning disorders (Almulla & Khasawneh, 2026). Explainable machine-learning approaches have likewise been applied to psychiatric comorbidity among depressed adolescents, demonstrating the potential to combine predictive accuracy with interpretation of the variables driving model decisions (Geng et al., 2025).
The broader literature demonstrates considerable diversity in the types of data that can be incorporated into predictive mental-health models. Social-media data have been used to examine risk factors associated with postpartum depression through attribute-selection and hybrid network approaches (Gopalakrishnan et al., 2023). Smartphone sensor paradata and personalized machine-learning models have been employed to infer individual well-being in ecological settings (Hart et al., 2022), while digital-health tools have been proposed for remote assessment of prognosis in depression (Angel et al., 2022). Machine-learning methods have also been used to identify factors associated with treatment response to mindfulness-based cognitive therapy among individuals with depressive symptoms (dethoor et al., 2022). In addition, predictive modelling has been extended to clinically consequential outcomes such as deliberate self-harm and suicide attempts in young people accessing primary care, demonstrating the potential of machine learning to support risk stratification across different levels of psychiatric severity (McHugh et al., 2023). These applications collectively indicate that machine learning is becoming increasingly integrated into the assessment, prognosis, and personalization of mental-health care.
At the same time, the value of prediction depends not simply on algorithmic performance but also on the temporal, contextual, and clinical meaning of the variables being modeled. Computational psychiatry has emphasized that psychological phenomena unfold dynamically and that accurate models should take both time and context into account (Hitchcock et al., 2022). Ecological momentary assessment research on cognitive-behavioral emotion-regulation training in major depression similarly demonstrates that psychological processes vary over time and may be better understood through repeated assessments than through static summaries alone (Laicher et al., 2025). Multimodal research predicting future depressive symptoms in adolescents further illustrates the direction of the field toward combining multiple sources of information rather than relying exclusively on isolated symptom measures (Wang et al., 2025). Longitudinal research programs focusing on emotional vulnerability in adolescents have likewise emphasized individual differences in depressive symptoms and their biopsychosocial mechanisms (Tariq et al., 2025b), while related work has sought to identify potential biopsychosocial markers of depressive symptoms and well-being (Tariq et al., 2025a). These developments support a multicomponent approach in which cognitive, behavioral, stress-related, and interpersonal features are evaluated simultaneously.
Machine-learning models may also have particular value when integrated into adaptive mental-health systems. Predictive algorithms have been incorporated into protocols designed to determine and adapt levels of psychological care for community college students (Wen et al., 2023). Just-in-time adaptive interventions similarly aim to provide support at moments when individuals are most likely to need or benefit from it, although systematic reviews indicate that the field continues to face methodological and implementation challenges (Genugten et al., 2025). Internet-delivered cognitive-behavioral interventions for depression and anxiety among university students represent another example of the increasing integration of digital delivery and personalized mental-health support (Watkins et al., 2025). Systematic reviews of computational strategies for depression detection and treatment have further highlighted the growing interface between behavioral activation, neurobiological knowledge, and data-driven approaches to identification and intervention (Tallón et al., 2025). Such developments reinforce the practical importance of parsimonious prediction models based on variables that are inexpensive, interpretable, and readily collected through self-report assessment.
Despite these advances, important gaps remain. Many machine-learning studies of depression have focused on demographic characteristics, digital traces, physiological markers, clinical histories, or very large multimodal feature sets. Although these approaches can enhance predictive performance, their complexity may limit interpretability, accessibility, or implementation in routine psychological screening. Other studies have examined closely related but distinct outcomes, such as smartphone addiction among adolescents with depression (Zhou et al., 2024), anxiety within depressed populations (Geng et al., 2025), or treatment response rather than depressive classification itself (dethoor et al., 2022). There remains a need for models that determine how a small, theoretically coherent set of modifiable psychosocial characteristics performs in classifying clinically significant depressive symptoms. Rumination, sleep quality, perceived stress, and perceived social support are particularly suitable because they represent complementary domains: maladaptive cognition, health-related behavior, subjective environmental burden, and interpersonal resources. A model incorporating these variables could therefore provide both predictive utility and clinically understandable information.
Another important consideration is interpretability. In mental-health research, an accurate classifier is more useful when researchers and clinicians can identify which features are contributing most strongly to its predictions. This issue has encouraged growing use of explainable machine-learning methods alongside traditional performance indicators. Studies employing explainable algorithms in psychiatric populations demonstrate that feature-ranking and interpretation can complement classification accuracy and facilitate understanding of relevant risk patterns (Geng et al., 2025). Similarly, the increasing use of machine learning to identify determinants of depression in population-based samples illustrates a movement toward models that not only predict outcomes but also clarify the relative importance of potentially modifiable characteristics (Li et al., 2025). Such interpretability is especially important when predictors are conceptually related. Rumination may intensify perceived stress, stress may interfere with sleep, poor sleep may impair emotional regulation, and reduced social support may weaken coping resources. Random Forest classification provides a useful framework for modeling these potentially nonlinear and interactive relationships while allowing complementary feature-importance analyses to clarify the contribution of each predictor.
Finally, the development of predictive models should remain linked to the broader objective of improving prevention and early intervention rather than replacing clinical assessment. Depression risk prediction can help identify patterns of vulnerability that warrant further evaluation, but classification based on self-report indicators should not be equated with psychiatric diagnosis. The increasing use of personalized digital tools, adaptive interventions, ecological assessment, and machine-learning models reflects a broader transition toward proactive and individualized mental-health care (Angel et al., 2022; Coenen et al., 2025; Genugten et al., 2025). At the same time, evidence concerning cognitive vulnerability, stress processes, sleep disruption, interpersonal resources, and predictive modelling suggests that relatively accessible psychological measures may provide substantial information about depressive risk (Everaert et al., 2022; Ganai et al., 2024; Wang et al., 2023). Developing an interpretable model based on such variables may therefore contribute to both theoretical understanding of depressive vulnerability and the practical identification of individuals who may benefit from more comprehensive assessment.
Accordingly, the aim of the present study was 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
Study Design and Participants
The present study employed a cross-sectional, predictive-correlational design using a supervised machine-learning approach to examine whether major depressive symptoms could be classified on the basis of rumination, sleep quality, perceived stress, and perceived social support. The study population consisted of adults residing in Canada. Participants were recruited through online advertisements distributed through university mailing lists, community organizations, social media platforms, and online research participation networks in several Canadian provinces. A total of 742 individuals initially accessed the study questionnaire. After removal of respondents who did not provide informed consent, failed to complete the principal study measures, submitted substantially incomplete questionnaires, or provided responses indicative of careless or duplicate participation, the final analytic sample consisted of exactly 684 participants. Participants were eligible for inclusion if they were 18 years of age or older, currently residing in Canada, able to read and understand English, and willing to complete the study questionnaires electronically. Individuals were excluded when more than 20% of the required questionnaire items were missing or when response-quality checks suggested invalid participation. Recruitment was conducted with the aim of obtaining variability in depressive symptom severity and the proposed psychosocial predictors rather than restricting the sample to individuals with a formal psychiatric diagnosis. This approach allowed the predictive model to distinguish participants with clinically significant major depressive symptoms from those below the established screening threshold within a heterogeneous community-based Canadian sample.
Before participation, all respondents were presented with an electronic information and consent form explaining the purpose of the study, voluntary nature of participation, confidentiality of responses, approximate duration of questionnaire completion, and right to discontinue participation without penalty. No personally identifying information was included in the analytic dataset, and participant responses were stored using anonymous study identifiers. Data collection was conducted entirely online using a secure survey platform. Participants first completed demographic questions, followed by measures of depressive symptoms, rumination, sleep quality, perceived stress, and perceived social support. The order of the main psychological questionnaires was standardized across participants to maintain consistency in data collection. The study was conducted in accordance with accepted ethical principles governing research involving human participants, including voluntary participation, informed consent, protection of confidentiality, and secure management of research data.
Measures
Major depressive symptoms were assessed using the Patient Health Questionnaire-9 (PHQ-9), a nine-item self-report instrument designed to measure the presence and severity of depressive symptoms during the previous two weeks. The items assess core manifestations of depression, including diminished interest or pleasure, depressed mood, sleep disturbances, fatigue, appetite changes, feelings of worthlessness or excessive guilt, concentration difficulties, psychomotor changes, and thoughts related to death or self-harm. Each item is rated from 0, indicating “not at all,” to 3, indicating “nearly every day,” resulting in a total score ranging from 0 to 27, with higher scores reflecting greater depressive symptom severity. For the primary machine-learning analysis, the PHQ-9 score was transformed into a binary classification outcome. Participants with a total score of 10 or higher were classified as presenting clinically significant major depressive symptoms, whereas those with scores below 10 were classified as not presenting clinically significant major depressive symptoms. The PHQ-9 was selected because it provides a brief and standardized assessment of depressive symptom severity and is widely used as a screening measure in community, clinical, and epidemiological research.
Rumination was assessed using the Ruminative Responses Scale (RRS), which measures the tendency to engage in repetitive and persistent thinking about negative emotional states, their possible causes, and their consequences. Participants rated the extent to which they typically engaged in different ruminative responses when experiencing sadness or distress. Items are rated on a four-point response scale ranging from low to high frequency, with higher total scores indicating a stronger tendency toward repetitive negative thinking. The RRS captures maladaptive cognitive processing that may maintain negative affect and interfere with effective problem solving or emotional recovery. The total rumination score was used as one of the principal predictor variables in the Random Forest model. Prior to model development, the distribution of rumination scores was examined for outliers, implausible values, and missing observations, and scale scores were computed according to the standard scoring procedure.
Sleep quality was measured using the Pittsburgh Sleep Quality Index (PSQI), which evaluates subjective sleep quality and sleep-related difficulties over the previous month. The PSQI assesses multiple dimensions of sleep functioning, including subjective sleep quality, sleep latency, sleep duration, habitual sleep efficiency, sleep disturbances, use of sleep medication, and daytime dysfunction. Component scores are combined to produce a global score, with higher scores representing poorer overall sleep quality and greater sleep-related impairment. The global PSQI score was entered into the machine-learning model as the indicator of sleep quality. Because higher PSQI values indicate poorer rather than better sleep, the original scoring direction was retained during analysis so that feature importance could be interpreted in accordance with the conventional scoring system.
Perceived stress was assessed using the 10-item Perceived Stress Scale (PSS-10). The PSS-10 measures the extent to which individuals perceive situations in their lives as unpredictable, uncontrollable, and overwhelming during the preceding month. Participants respond to each item using a five-point scale ranging from 0, indicating “never,” to 4, indicating “very often.” Positively worded items are reverse-scored before calculation of the total score. Higher total scores indicate greater perceived stress. The PSS-10 was used because the construct assessed by the instrument reflects subjective appraisal of environmental demands rather than exposure to any single stressful event, making it particularly appropriate for examining the relationship between generalized psychological stress and depressive symptoms. The calculated total perceived-stress score was included as a continuous predictor in the Random Forest classifier.
Perceived social support was evaluated using the Multidimensional Scale of Perceived Social Support (MSPSS). This instrument assesses individuals’ perceptions of the availability and adequacy of social support received from family members, friends, and significant others. Items are rated on a Likert-type scale, and higher scores indicate stronger perceived social support. Although the instrument permits calculation of separate family, friend, and significant-other subscale scores, the overall mean score was used in the primary predictive analysis to represent general perceived social support. This decision was made to preserve a parsimonious predictor structure consistent with the primary objective of evaluating the predictive contribution of the four constructs specified in the study model. The overall MSPSS score was therefore entered alongside rumination, sleep quality, and perceived stress as a continuous feature in the Random Forest classification algorithm.
Demographic information was collected to describe the characteristics of the study sample and included age, gender, province or territory of residence, educational attainment, employment status, and relationship status. These variables were examined descriptively but were not included as primary predictors in the principal Random Forest model because the objective of the study was specifically to determine the classification performance of rumination, sleep quality, perceived stress, and social support. Restricting the primary feature set to these four theoretically relevant psychological variables also facilitated a clearer evaluation of their relative predictive importance and reduced the likelihood that model performance would be driven by demographic characteristics rather than the focal psychosocial constructs.
Data analysis
Data analysis was conducted using a combination of conventional statistical procedures and supervised machine-learning techniques. The dataset was initially screened for completeness, duplicate records, impossible values, response irregularities, and extreme observations. Descriptive statistics, including means, standard deviations, frequencies, and percentages, were calculated to characterize the participants and the principal study variables. The distributions of PHQ-9, rumination, PSQI, perceived-stress, and social-support scores were examined before machine-learning analysis. Missing item-level responses within otherwise sufficiently completed questionnaires were handled according to the scoring recommendations of the relevant instruments when permissible. Cases with extensive missing information on the principal variables were excluded before model development. Because Random Forest algorithms do not require normally distributed predictors and are robust to nonlinear associations and interactions among features, transformation of normally non-distributed predictor variables was not considered necessary solely for meeting parametric assumptions.
For machine-learning classification, the binary PHQ-9 outcome was used as the target variable, with a score of 10 or higher representing the positive class for clinically significant major depressive symptoms and a score below 10 representing the negative class. Rumination, global sleep-quality score, perceived-stress score, and perceived-social-support score constituted the four input features. The complete analytic dataset of 684 participants was divided using stratified random sampling so that the proportion of participants belonging to each depression class was maintained across subsets. Eighty percent of the cases were allocated to the training dataset and the remaining 20% to an independent test dataset. Consequently, 547 participants were included in the training set and 137 participants were retained as the holdout test set. The test data were not used during model training or hyperparameter selection and were reserved exclusively for final assessment of out-of-sample predictive performance.
A Random Forest classifier was selected because it can model complex nonlinear relationships, accommodate interactions among predictors without requiring their prior specification, and reduce the overfitting associated with individual decision trees through bootstrap aggregation and random feature selection. Model development was performed exclusively within the training dataset. Hyperparameter optimization was conducted using stratified five-fold cross-validation. Candidate values were evaluated for the number of trees, maximum tree depth, minimum number of observations required for node splitting, minimum observations permitted in terminal nodes, and number of predictors considered at each split. Cross-validation folds preserved the class distribution of the outcome. Hyperparameter selection was based primarily on the area under the receiver operating characteristic curve, while classification sensitivity and F1 score were additionally examined to ensure that improved overall discrimination was not achieved at the expense of inadequate identification of participants with elevated depressive symptoms. To reduce possible bias resulting from unequal frequencies of the two outcome classes, class weighting was incorporated during model training so that classification errors in the less frequent class received greater weight. All preprocessing and model-selection procedures were restricted to the training data to prevent information leakage from the holdout test sample.
The final Random Forest model, using the optimal hyperparameter configuration identified during cross-validation, was subsequently fitted to the entire training dataset and evaluated once on the independent test set. Predictive performance was quantified using accuracy, sensitivity or recall, specificity, precision, F1 score, and the area under the receiver operating characteristic curve (ROC-AUC). Accuracy represented the proportion of all participants correctly classified, whereas sensitivity reflected the model’s ability to correctly identify participants with clinically significant depressive symptoms. Specificity represented correct identification of participants without clinically significant symptoms, and precision indicated the proportion of participants predicted to have major depressive symptoms who actually belonged to the positive class according to the PHQ-9 criterion. The F1 score was calculated as the harmonic mean of precision and recall and was used to provide a balanced measure of positive-class performance. The ROC curve was generated across alternative classification thresholds, and ROC-AUC was used as an overall indicator of the classifier’s ability to discriminate between participants with and without clinically significant depressive symptoms.
In addition to evaluating classification performance, the relative contribution of the four psychosocial predictors was examined using feature-importance analyses. Permutation feature importance was calculated by repeatedly disrupting the values of each predictor in the holdout data and determining the resulting reduction in model performance. A larger deterioration in predictive performance following permutation was interpreted as evidence that the corresponding variable made a greater contribution to the classifier. Feature-importance estimates were used to compare the predictive relevance of rumination, sleep quality, perceived stress, and perceived social support. To supplement global feature importance and facilitate interpretation of the direction and magnitude of individual predictor contributions, SHapley Additive exPlanations (SHAP) were also examined. SHAP values were used to determine how higher or lower levels of each psychosocial variable influenced the probability that the model would classify a participant as having clinically significant depressive symptoms. This interpretability procedure was incorporated because strong predictive performance alone does not establish which features are driving model decisions, whereas SHAP-based analysis permits examination of both global predictor importance and participant-level model explanations.
Model performance was interpreted with emphasis on generalization to previously unseen observations rather than performance within the training sample. Confusion matrices and probability-based performance indices were examined together to avoid reliance on accuracy alone, particularly because accuracy may provide an incomplete representation of model quality when outcome classes are unequally distributed. All random data-partitioning and model-fitting procedures were performed using a prespecified random seed to improve computational reproducibility. Statistical tests used for preliminary descriptive comparisons were interpreted using a two-sided significance level of p < .05, whereas machine-learning performance was evaluated primarily through predictive metrics rather than null-hypothesis significance testing. The final analytic workflow therefore integrated conventional psychometric scoring, rigorous separation of training and test observations, stratified cross-validation, Random Forest hyperparameter optimization, multidimensional evaluation of classification performance, and feature-level interpretability analyses to determine the extent to which rumination, sleep quality, perceived stress, and perceived social support could jointly predict major depressive symptoms in Canadian adults.
Findings and Results
The final analytic sample consisted of 684 adults residing in Canada, with a mean age of 35.4 years (SD = 11.8; range = 18–69 years). Of the participants, 386 (56.4%) identified as women, 278 (40.6%) as men, and 20 (2.9%) identified as nonbinary or another gender identity. With respect to geographic distribution, 257 participants (37.6%) resided in Ontario, 143 (20.9%) in Quebec, 106 (15.5%) in British Columbia, 88 (12.9%) in Alberta, 48 (7.0%) in the Atlantic provinces, 34 (5.0%) in Manitoba or Saskatchewan, and 8 (1.2%) in one of the Canadian territories. Regarding educational attainment, 124 participants (18.1%) reported a high-school education or lower, 184 (26.9%) had completed a college diploma or equivalent qualification, 238 (34.8%) held a bachelor’s degree, and 138 (20.2%) had completed postgraduate education. In terms of employment status, 321 participants (46.9%) were employed full-time, 109 (15.9%) were employed part-time, 96 (14.0%) were students, 79 (11.5%) were unemployed, and 79 (11.5%) reported another employment status, including retirement, caregiving, or temporary leave. A total of 324 participants (47.4%) were married or living with a partner, 274 (40.1%) were single, and 86 (12.6%) were separated, divorced, or widowed. Based on the predefined PHQ-9 cutoff score of 10, 261 participants (38.2%) were classified as having clinically significant major depressive symptoms, whereas 423 participants (61.8%) were classified below the threshold. Stratified allocation retained approximately the same class distribution in the machine-learning subsets: the training dataset included 547 participants, of whom 209 were in the positive class and 338 in the negative class, whereas the independent test dataset included 137 participants, with 52 positive and 85 negative cases.
Predictor variable | Total sample M (SD) | Below PHQ-9 cutoff M (SD), n = 423 | Major depressive symptoms M (SD), n = 261 | Mean difference | t | p | Cohen’s d |
|---|---|---|---|---|---|---|---|
Rumination | 41.09 (11.31) | 36.70 (10.10) | 48.20 (9.40) | 11.50 | 15.10 | < .001 | 1.17 |
Poor sleep quality | 7.19 (3.55) | 5.70 (2.80) | 9.60 (3.30) | 3.90 | 15.89 | < .001 | 1.30 |
Perceived stress | 19.04 (7.22) | 15.80 (6.00) | 24.30 (5.80) | 8.50 | 18.37 | < .001 | 1.43 |
Perceived social support | 4.92 (1.24) | 5.30 (1.10) | 4.30 (1.20) | -1.00 | -10.93 | < .001 | -0.88 |
As presented in Table 1, substantial differences were observed between participants who scored above and below the PHQ-9 classification threshold across all four predictor variables. Participants with clinically significant major depressive symptoms reported markedly greater rumination, with a mean score of 48.20 (SD = 9.40), compared with 36.70 (SD = 10.10) among participants below the depression threshold. The mean difference of 11.50 points was statistically significant, t = 15.10, p < .001, and corresponded to a large standardized effect size of Cohen’s d = 1.17. Poor sleep quality was also considerably more pronounced among participants in the major depressive symptom group. Their mean PSQI score was 9.60 (SD = 3.30), compared with 5.70 (SD = 2.80) in the lower-symptom group, producing a mean difference of 3.90 points, t = 15.89, p < .001, and a large effect size of d = 1.30. The largest standardized between-group difference was identified for perceived stress. Participants classified as having major depressive symptoms had a mean PSS-10 score of 24.30 (SD = 5.80), whereas the corresponding mean among participants below the PHQ-9 threshold was 15.80 (SD = 6.00). This 8.50-point difference was statistically significant, t = 18.37, p < .001, with a large effect size of d = 1.43. In contrast to the other variables, perceived social support was lower among participants with elevated depressive symptoms. The major depressive symptom group had a mean MSPSS score of 4.30 (SD = 1.20), compared with 5.30 (SD = 1.10) among participants below the cutoff, t = -10.93, p < .001, d = -0.88. Collectively, these descriptive findings indicated that clinically significant depressive symptoms were characterized by greater rumination, poorer sleep quality, greater perceived stress, and lower perceived social support. The magnitude of these differences also demonstrated substantial separation between the two classification groups before application of the machine-learning model, with perceived stress showing the strongest univariate differentiation.
Cross-validation fold | ROC-AUC | Accuracy | Sensitivity | Specificity | F1 score |
|---|---|---|---|---|---|
Fold 1 | .884 | .818 | .786 | .838 | .762 |
Fold 2 | .901 | .836 | .810 | .852 | .784 |
Fold 3 | .892 | .827 | .786 | .852 | .771 |
Fold 4 | .907 | .845 | .833 | .852 | .800 |
Fold 5 | .896 | .835 | .810 | .852 | .786 |
Mean | .896 | .832 | .805 | .849 | .781 |
SD | .009 | .010 | .020 | .006 | .015 |
Table 2 summarizes the predictive performance obtained during stratified five-fold cross-validation within the training sample. Performance remained relatively stable across the five folds, suggesting that the model was not disproportionately dependent on a particular subset of participants. ROC-AUC values ranged from .884 to .907, with a mean cross-validated ROC-AUC of .896 (SD = .009), indicating consistently strong discrimination between participants above and below the threshold for clinically significant major depressive symptoms. Mean cross-validated accuracy was .832 (SD = .010), with individual fold values ranging from .818 to .845. Sensitivity ranged from .786 to .833 and produced a mean value of .805 (SD = .020), indicating that approximately four-fifths of participants with elevated depressive symptoms were correctly identified during cross-validation. Specificity was somewhat higher and more stable, ranging from .838 to .852, with a mean of .849 (SD = .006). The mean F1 score was .781 (SD = .015), reflecting a favorable balance between precision and sensitivity for classification of the positive depressive-symptom class. Hyperparameter optimization indicated that the best-performing model consisted of 500 decision trees, a maximum tree depth of 8, a minimum of 10 observations required to split an internal node, a minimum of 4 observations per terminal leaf, and square-root feature sampling at each candidate split. Balanced class weighting was retained in the final model to reduce the influence of the moderately unequal distribution of the positive and negative outcome classes. The small standard deviations across folds, particularly for ROC-AUC, accuracy, and specificity, suggested that model performance was stable during resampling and provided no indication of substantial variation attributable to individual cross-validation partitions. On this basis, the optimized configuration was subsequently fitted to the full training sample and evaluated on the independent holdout test dataset.
Performance indicator | Estimate | 95% confidence interval |
|---|---|---|
Accuracy | .847 | .777–.898 |
Sensitivity (Recall) | .827 | .703–.906 |
Specificity | .859 | .769–.917 |
Precision | .782 | .656–.871 |
F1 score | .804 | .704–.877 |
ROC-AUC | .901 | .849–.944 |
The final Random Forest classifier maintained strong predictive performance when applied to the independent test dataset, as shown in Table 3. Of the 137 participants in the holdout sample, 116 were correctly classified, yielding an overall accuracy of .847 (95% CI [.777, .898]). Among the 52 participants who met the PHQ-9 criterion for clinically significant major depressive symptoms, 43 were correctly classified as positive and 9 were incorrectly classified as negative, resulting in a sensitivity of .827 (95% CI [.703, .906]). Among the 85 participants below the depressive-symptom cutoff, 73 were correctly identified as negative and 12 were incorrectly classified as positive, resulting in a specificity of .859 (95% CI [.769, .917]). Thus, the model demonstrated a relatively balanced capacity to identify both positive and negative cases, although specificity was modestly higher than sensitivity. Precision was .782 (95% CI [.656, .871]), indicating that approximately 78% of participants classified by the algorithm as having clinically significant depressive symptoms actually belonged to the positive PHQ-9 category. The F1 score of .804 (95% CI [.704, .877]) further indicated a strong balance between positive predictive accuracy and the ability to identify individuals with elevated depressive symptoms. Most importantly, the ROC-AUC reached .901 (95% CI [.849, .944]), demonstrating excellent overall discrimination across alternative classification thresholds. The similarity between the mean cross-validation ROC-AUC of .896 and the independent test-set ROC-AUC of .901 provided additional evidence that predictive performance generalized effectively beyond the data used for model development. The absence of a substantial decline from training cross-validation to independent testing also suggested that the Random Forest classifier did not exhibit marked overfitting under the selected hyperparameter configuration.
Predictor | Rank | Mean decrease in ROC-AUC after permutation | Relative permutation importance (%) | Mean absolute SHAP value | Predominant relationship with predicted depressive-symptom probability |
|---|---|---|---|---|---|
Perceived stress | 1 | .089 | 36.2 | .131 | Higher stress increased predicted probability |
Rumination | 2 | .074 | 30.1 | .116 | Higher rumination increased predicted probability |
Poor sleep quality | 3 | .051 | 20.7 | .084 | Poorer sleep increased predicted probability |
Perceived social support | 4 | .032 | 13.0 | .061 | Higher support decreased predicted probability |
The feature-importance findings presented in Table 4 demonstrated that all four psychosocial predictors contributed meaningfully to the classification of major depressive symptoms, although their relative predictive contributions differed. Perceived stress emerged as the most influential feature in the model. Permuting perceived-stress scores resulted in a mean decrease of .089 in ROC-AUC, representing 36.2% of the total relative permutation importance. Perceived stress also had the largest mean absolute SHAP value (.131), confirming its dominant contribution to individual model predictions. SHAP-based examination indicated that higher perceived-stress scores generally shifted predictions toward the positive major depressive symptom class, whereas lower stress levels reduced predicted probability. Rumination was the second most influential variable, with permutation producing a .074 reduction in ROC-AUC and accounting for 30.1% of total relative importance. Its mean absolute SHAP value of .116 similarly indicated a substantial contribution to the classifier. Higher rumination scores consistently contributed toward greater predicted probability of clinically significant depressive symptoms. Poor sleep quality ranked third, with a mean permutation-related ROC-AUC decrease of .051 and 20.7% relative importance. Its mean absolute SHAP value was .084, and higher PSQI scores, reflecting poorer sleep, were predominantly associated with increased predicted depressive-symptom probability. Perceived social support had the lowest relative importance among the four variables, but its contribution remained meaningful. Permuting social-support scores reduced ROC-AUC by .032, corresponding to 13.0% of total relative feature importance, while its mean absolute SHAP value was .061. Unlike stress, rumination, and poor sleep, higher perceived social support generally shifted model predictions away from the positive depressive-symptom class. These results indicated that the predictive model was not driven by a single variable; rather, classification reflected the combined contributions of cognitive, stress-related, sleep-related, and interpersonal factors. Nevertheless, perceived stress and rumination together accounted for approximately two-thirds of the overall permutation-based feature importance, identifying them as the strongest contributors to Random Forest classification.
The receiver operating characteristic analysis illustrated the model’s ability to distinguish between participants with and without clinically significant major depressive symptoms across the complete range of possible probability thresholds. The resulting ROC-AUC of .901 (95% CI [.849, .944]) indicated excellent discriminatory capacity and was substantially above the .50 value expected under chance classification. The ROC curve therefore demonstrated that the predicted probabilities generated from rumination, sleep quality, perceived stress, and perceived social support successfully ranked participants according to their likelihood of belonging to the elevated depressive-symptom group. At the classification threshold used for the primary test-set analysis, the model achieved sensitivity of .827 and specificity of .859, indicating that strong detection of participants with clinically significant symptoms was achieved without a substantial increase in false-positive classifications. The relatively favorable position of the ROC curve toward the upper-left region of the ROC space was consistent with the combination of high sensitivity and specificity observed in the independent sample. Furthermore, the test-set ROC-AUC closely corresponded to the mean ROC-AUC obtained during five-fold cross-validation, providing evidence that discrimination remained stable when the classifier was applied to previously unseen data. Taken together, the ROC analysis, confusion-matrix-derived indices, and feature-importance results indicated that the four psychosocial variables contained substantial predictive information regarding clinically significant major depressive symptoms. The model demonstrated strong generalization performance while maintaining interpretable contributions from each of the theoretically selected predictor variables.
Discussion
The present study examined whether rumination, sleep quality, perceived stress, and perceived social support could be used to classify clinically significant major depressive symptoms among Canadian adults using a Random Forest machine-learning approach. The findings demonstrated strong predictive performance. The optimized model achieved a mean cross-validated ROC-AUC of .896 and maintained comparable performance in the independent test sample, where ROC-AUC reached .901. Test-set accuracy was .847, sensitivity was .827, specificity was .859, precision was .782, and the F1 score was .804. The close correspondence between cross-validation and holdout-test performance suggested that the model generalized well to previously unseen cases and did not show evidence of substantial overfitting. Feature-importance analyses further indicated that perceived stress was the strongest predictor of clinically significant depressive symptoms, followed by rumination, poor sleep quality, and perceived social support. SHAP-based interpretation showed that higher perceived stress, greater rumination, and poorer sleep quality increased the predicted probability of belonging to the depressive-symptom group, whereas stronger perceived social support reduced that probability. These findings collectively support a multidimensional conceptualization of depressive vulnerability in which cognitive, stress-related, behavioral, and interpersonal characteristics contribute jointly to the likelihood of clinically significant symptoms.
The strong overall classification performance is consistent with an expanding literature demonstrating that machine-learning methods can identify psychologically meaningful patterns associated with depression across heterogeneous populations. Previous studies have successfully applied machine-learning algorithms to predict depression in young employees, adolescents, university students, and young adults with learning-related vulnerabilities (Almulla & Khasawneh, 2026; Kim et al., 2023; Li et al., 2025). The present ROC-AUC of .901 indicates that a comparatively parsimonious model containing only four self-report psychosocial predictors was able to distinguish participants above and below the PHQ-9 threshold with excellent discrimination. This finding is important because many contemporary predictive studies use large multimodal feature sets, physiological signals, passive digital data, or complex demographic and clinical information. For example, multimodal approaches have been applied to predict future depressive symptoms among adolescents (Wang et al., 2025), whereas digital phenotyping research has emphasized the potential value of smartphone-derived and behavioral information for mood assessment (Maatoug et al., 2022). The present findings suggest that substantial predictive information may also be obtainable from a small set of theoretically selected, clinically interpretable variables.
The stability of the model across cross-validation folds and independent testing further strengthens the interpretation that the selected predictors captured meaningful variance in depressive symptom classification. Computational mental-health research has increasingly emphasized that predictive accuracy should be evaluated on data that were not used for model fitting, because performance within training samples can substantially overestimate clinical usefulness. The close similarity between the mean cross-validation ROC-AUC of .896 and test ROC-AUC of .901 therefore represents an encouraging aspect of the present results. Related research has demonstrated the utility of machine-learning models for predicting emotional disorders over longitudinal periods (Bailey & Strunk, 2023), identifying psychiatric risk factors in depressed populations (Geng et al., 2025), and modelling clinically significant outcomes such as self-harm and suicide attempts (McHugh et al., 2023). These studies support the broader proposition that machine learning can complement conventional statistical methods by detecting complex multivariable patterns that may be difficult to characterize through isolated bivariate associations.
Perceived stress emerged as the strongest predictor in the Random Forest model, accounting for the largest decline in ROC-AUC when permuted and exhibiting the highest mean absolute SHAP value. Participants classified as having clinically significant major depressive symptoms also reported substantially higher perceived stress than those below the PHQ-9 cutoff, with the largest standardized group difference among the four predictors. This pattern is consistent with the central role of subjective stress appraisal in emotional disorders. Perceived stress reflects the extent to which environmental demands are experienced as unpredictable, uncontrollable, and overwhelming, and such appraisals may contribute to sustained physiological arousal, negative affect, impaired coping, and diminished psychological resources. Recent evidence from university populations has identified stress-related processes among important factors associated with anxiety and depression (Jiang, 2026). Similarly, network and machine-learning analyses of stress, anxiety, and depression have shown that these constructs are tightly interconnected and that stress-related indicators can carry substantial predictive information regarding emotional distress (Ganai et al., 2024).
The dominant importance of perceived stress can also be understood in relation to the other variables included in the model. Stress is unlikely to operate independently of cognitive and behavioral regulation. Individuals who perceive environmental demands as overwhelming may be more likely to engage in repetitive negative thinking, experience difficulty disengaging from emotionally salient concerns, and develop sleep disturbances. Research examining chronic stress through daily-life physiological and lifestyle data has demonstrated that stress can be predicted from multidimensional behavioral patterns rather than from single isolated indicators (Magal et al., 2022). Likewise, rumination has been identified as a mechanism linking stressful experiences with internalizing symptoms (Fredrick et al., 2022). The present results are therefore compatible with an integrative interpretation in which perceived stress functions as a central proximal vulnerability factor whose influence is amplified or maintained by maladaptive cognitive processing and impaired restorative functioning.
Rumination was the second strongest predictor of major depressive symptoms and showed a large difference between the depressive and non-depressive groups. This result accords closely with cognitive theories of depression, which emphasize repetitive self-focused negative thinking as an important mechanism contributing to the persistence and intensification of depressed mood. Rumination can direct attention repeatedly toward perceived failures, losses, emotional discomfort, and unresolved problems while reducing engagement in effective problem solving or rewarding activities. Research on distorted cognitive processes in major depressive disorder has similarly highlighted maladaptive information processing as a core feature of depressive psychopathology (Chen, 2023). More directly, artificial neural-network analyses have demonstrated that characteristics of repetitive negative thinking contribute meaningfully to depression prediction and that specific cognitive features can carry distinct predictive value (Everaert et al., 2022). The prominence of rumination in the present Random Forest model therefore supports the view that repetitive negative cognition represents a particularly informative indicator of depressive vulnerability.
The association between rumination and depression may also reflect its role as a mechanism through which stressful experiences become prolonged psychologically. Longitudinal evidence has shown that rumination mediates the relationship between COVID-19-related stress and later internalizing symptoms in adolescents (Fredrick et al., 2022). Related research has examined rumination as an indirect pathway linking acculturative stress to insomnia (Cosenzo & Alcántara, 2026), indicating that repetitive negative thinking may connect stressful experiences to both emotional and sleep-related consequences. Furthermore, increasing interest in interventions designed specifically to reduce work-related rumination highlights the clinical relevance of this cognitive process (Ciobotaru et al., 2026). Taken together, these findings help explain why rumination contributed strongly to classification in the present study. Individuals who repeatedly rehearse distressing thoughts may maintain negative emotional activation, amplify perceived stress, and interfere with recovery processes, thereby increasing the probability of clinically significant depressive symptoms.
Poor sleep quality ranked as the third most influential feature and was substantially elevated among participants meeting the PHQ-9 threshold. This result is consistent with a large body of research showing close associations between disturbed sleep and emotional symptoms. Poor sleep can impair attentional control, increase emotional reactivity, reduce tolerance for stress, and compromise executive functioning, all of which may increase vulnerability to depressive cognition and negative affect. Conversely, depressive symptoms can disrupt sleep initiation, maintenance, and subjective restfulness, suggesting a potentially reciprocal relationship. Among college students, poorer sleep quality has been associated with higher anxiety and depressive symptoms, with cognitive emotion regulation contributing to the association (Wang et al., 2023). Insomnia has similarly been identified as a mediator linking emotion-regulation strategies with mental-health symptoms (Mojsa‐Kaja & Ivčević, 2022). The current finding that poor sleep meaningfully improved classification therefore reinforces the importance of sleep as more than a secondary symptom of depression.
Sleep quality may also interact with both rumination and social support in determining emotional outcomes. Research conducted during pandemic-related social restrictions demonstrated interconnected relationships among social support, rumination, sleep quality, and negative emotions (Guo et al., 2022). This finding is particularly compatible with the present model, because the same three domains were incorporated simultaneously rather than examined in isolation. Rumination may interfere with sleep through prolonged pre-sleep cognitive arousal, whereas poor sleep may subsequently reduce cognitive control and make disengagement from negative thoughts more difficult. Similarly, insufficient social resources may leave individuals with fewer opportunities for emotional disclosure or stress buffering, thereby increasing nocturnal cognitive activation. Predictive research concerning seasonal mood fluctuations has also demonstrated that self-reported psychological characteristics can provide meaningful information about future mood variation (Höller et al., 2022). The present findings extend this general literature by showing that subjective sleep quality contributes independent predictive information when combined with stress, rumination, and social support.
Perceived social support was the least influential of the four variables according to permutation importance and SHAP values, but its contribution remained meaningful and its directional relationship was theoretically consistent. Participants meeting the depressive-symptom criterion reported lower social support, and higher support reduced the model-estimated probability of clinically significant depression. Social support may protect against depressive symptoms by providing emotional reassurance, practical assistance, opportunities for cognitive reframing, and a sense of belonging during stressful experiences. Its comparatively lower feature-importance ranking should therefore not be interpreted as indicating irrelevance. Random Forest importance is inherently conditional on the information contributed by other predictors, and some of the variance associated with support may overlap with perceived stress, rumination, or sleep quality. Previous research has demonstrated associations between social support and negative emotional states and has shown that rumination and sleep quality can play important roles in these relationships (Guo et al., 2022). Thus, social support may operate partly through indirect or interactive pathways rather than only through a strong independent main effect.
The comparatively protective contribution of social support also fits with broader work emphasizing the importance of contextual and interpersonal information in personalized mental-health assessment. Mobile-health research involving individuals who have remitted from depression has highlighted the need for early-relapse detection systems that are sensitive to users' lived contexts and concerns (Coenen et al., 2025). Similarly, just-in-time adaptive intervention research increasingly focuses on identifying moments of heightened vulnerability so that support can be delivered when it is most useful (Genugten et al., 2025). From this perspective, perceived social support may represent a contextual resource that modifies how cognitive and behavioral risk factors translate into depressive outcomes. An individual experiencing high stress or poor sleep may not necessarily develop severe symptoms if sufficient relational support is available, whereas limited support may intensify vulnerability. The present machine-learning model was able to capture some of these potentially nonlinear relationships without requiring their exact functional form to be specified in advance.
The combined importance of all four predictors supports a biopsychosocial and computational understanding of depressive symptoms rather than a single-factor account. Contemporary studies of emotional vulnerability increasingly emphasize multidimensional mechanisms, individual differences, and combinations of demographic, psychological, and behavioral markers (Tariq et al., 2025a, 2025b). Research examining cognitive vulnerability and depressive burden likewise points toward the importance of considering multiple interacting risk processes (Li et al., 2026). Machine-learning frameworks are particularly well suited to this perspective because they can model nonlinear associations and higher-order interactions among predictors. The present findings suggest that perceived stress may represent the strongest immediate signal, but classification was improved by information concerning cognitive perseveration, sleep disruption, and interpersonal resources. Such a pattern is consistent with the view that major depressive symptoms emerge through converging vulnerabilities rather than through one uniform pathway.
The interpretability analyses also represent an important aspect of the findings. High predictive accuracy is of limited value in psychological research if the factors driving a model's decisions cannot be understood. The use of permutation importance and SHAP values enabled identification of both the relative contribution and predominant direction of each predictor. Explainable machine-learning approaches are increasingly being used in psychiatric research to identify clinically meaningful variables while maintaining predictive performance (Geng et al., 2025). Similar efforts to develop depression prediction models have emphasized identification of key determinants rather than classification accuracy alone (Li et al., 2025). In the present study, the interpretability results were coherent with established psychological theory: greater stress, rumination, and sleep disturbance increased depressive-symptom probability, whereas greater social support reduced it. This convergence between computational prediction and theoretical expectation enhances the substantive plausibility of the model.
The findings also have implications for the growing integration of prediction into digital and adaptive mental-health care. Predictive algorithms have already been incorporated into protocols designed to triage individuals to different levels of psychological support (Wen et al., 2023), while remote digital assessment has been proposed as a means of monitoring prognosis in depression (Angel et al., 2022). Internet-delivered psychological interventions are likewise becoming increasingly relevant for depression and anxiety management in large populations (Watkins et al., 2025). Computational reviews of depression detection and treatment suggest that data-driven approaches may ultimately contribute to more personalized intervention pathways (Tallón et al., 2025). The present results indicate that accessible self-report measures of stress, rumination, sleep, and support could potentially contribute to such systems without requiring expensive neurobiological or sensor-based assessments.
Conclusion
Nevertheless, predictive classification should not be interpreted as equivalent to clinical diagnosis. The PHQ-9 threshold used in the present study represents clinically significant depressive symptomatology rather than confirmation of major depressive disorder through a structured diagnostic interview. Machine-learning predictions should therefore be viewed as tools for risk stratification and screening rather than autonomous diagnostic decisions. Computational psychiatry has emphasized the need to preserve contextual and temporal understanding when interpreting algorithmic outputs (Hitchcock et al., 2022). Similarly, digital-phenotyping research has warned that technically measurable behavioral signals require careful clinical interpretation (Maatoug et al., 2022). The present model is most appropriately understood as demonstrating that a compact set of psychosocial variables can provide strong discriminatory information concerning depressive symptom burden and may support, rather than replace, comprehensive psychological assessment.
Limitations & Suggestions
Several limitations should be considered when interpreting the findings. First, the cross-sectional design prevents conclusions regarding temporal or causal direction. Although perceived stress, rumination, poor sleep quality, and low social support predicted current classification status, the data cannot establish whether these characteristics preceded depressive symptoms, resulted from them, or developed reciprocally. Second, all primary variables were assessed through self-report measures, introducing the possibility of common-method variance, recall bias, and response-style effects. Third, major depressive symptoms were operationalized using a PHQ-9 cutoff rather than a structured clinical diagnostic interview, and the positive class therefore reflects clinically significant symptom burden rather than confirmed major depressive disorder. Fourth, although the sample included adults from several Canadian regions, online recruitment may have produced selection bias and may underrepresent individuals with limited internet access, lower digital literacy, or severe psychiatric impairment. Fifth, only four psychosocial predictors were included. Although this parsimonious structure enhanced interpretability, potentially informative factors such as socioeconomic status, physical health, psychiatric history, trauma exposure, substance use, physical activity, loneliness, and treatment history were not incorporated. Finally, although the independent test set reduced the risk of optimistic internal performance estimates, external validation in a completely separate population was not conducted.
Future studies should prioritize prospective and longitudinal designs in order to determine whether rumination, perceived stress, sleep quality, and social support predict the subsequent emergence, persistence, remission, or recurrence of depressive symptoms. External validation should be conducted in independent Canadian samples and in populations differing in age, cultural background, socioeconomic circumstances, and clinical status. Future work could compare Random Forest classification with alternative algorithms, including gradient boosting, support vector machines, regularized logistic regression, neural networks, and ensemble approaches, while evaluating both discrimination and calibration. Researchers should also examine whether the four psychosocial variables retain their predictive value after integration with demographic, behavioral, clinical, and biological features. Repeated ecological assessments, wearable-device indicators, sleep-monitoring data, and passive digital measures could be incorporated to capture temporal changes that are not available from one-time questionnaires. Further studies should assess interaction effects and clinically meaningful thresholds, determine whether specific rumination or social-support dimensions provide greater predictive value than total scores, and investigate whether prediction differs across gender or developmental groups. Clinical diagnostic interviews should also be incorporated to test whether similar predictive patterns are obtained when major depressive disorder rather than questionnaire-defined depressive symptom severity is used as the outcome.
The present findings suggest that psychological screening programs may benefit from assessing perceived stress, rumination, sleep quality, and perceived social support together rather than relying solely on depression symptom scores. Perceived stress and rumination deserve particular attention because they made the strongest contributions to classification, although sleep disturbance and low social support also provided meaningful information. In primary care, university counseling services, community mental-health programs, and digital screening systems, brief assessment of these variables could help identify individuals who may warrant more comprehensive evaluation. Interventions for people with elevated depressive risk may be strengthened by including stress-management skills, strategies for disengaging from repetitive negative thinking, behavioral and cognitive approaches to improving sleep, and efforts to strengthen accessible sources of interpersonal support. Any machine-learning tool developed from these findings should be used as a decision-support instrument rather than as an autonomous diagnostic system, and individuals identified as high risk should receive appropriate professional assessment. Clinical implementation should also include transparent explanation of model outputs, protection of personal data, periodic evaluation of predictive performance, and monitoring for differences in accuracy across population subgroups.
Acknowledgments
We would like to express our appreciation and gratitude to all those who cooperated in carrying out this study.
Declaration of Interest
The authors of this article declared no conflict of interest.
Ethical Considerations
The study protocol adhered to the principles outlined in the Helsinki Declaration, which provides guidelines for ethical research involving human participants.
Transparency of Data
In accordance with the principles of transparency and open research, we declare that all data and materials used in this study are available upon request.
Funding
This research was carried out independently with personal funding and without the financial support of any governmental or private institution or organization.
Authors’ Contributions
All authors equally contributed in this article.
Declaration
In order to correct and improve the academic writing of our paper, we have used the language model ChatGPT.
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). doi 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. doi 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. doi 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. doi 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). doi 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. doi 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. doi 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. doi 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. doi 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. doi 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. doi 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. doi 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. doi 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). doi 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. doi 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). doi 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. doi 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. doi 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. doi 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. doi 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. doi 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. doi 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). doi 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. doi 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. doi 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. doi 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. doi 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. doi 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. doi 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. doi 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. doi 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). doi 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). doi 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. doi 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). doi 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). doi 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. doi 10.21203/rs.3.rs-5007740/v1