IJMSRT foster a global community of researchers and provide them with a platform to publish and access high-quality scientific content. We strive to be at the forefront of scientific communication, enabling the rapid dissemination of cutting-edge research and driving advancements in various fields.
Read moreBackground Depression is a significant public health problem that has significant personal and community impacts. Because it is a multifactorial and complex phenomenon, and the factors that contribute to its development are interrelated, traditional statistical models may not be able to precisely identify people at risk. Machine learning (ML) is a data-driven method for modelling complex patterns and enhancing depression prediction. Methods The data for this study was obtained from the National Health and Nutrition Examination Survey (NHANES) 2021-2023 to predict depression among adolescents and adults in the United States. The Patient Health Questionnaire-9 (PHQ-9) was used to assess depression, and a score of ≥10 was considered to be depression. Six supervised machine learning algorithms were tested: logistic regression (LR), random forest (RF), naïve Bayes (NB), support vector machine (SVM), eXtreme Gradient Boosting (XGBoost), and Light Gradient Boosting Machine (LightGBM). After data preprocessing, feature selection, and imputation, the data was split into an 80:20 ratio for training and testing. Random undersampling of the training data was used to deal with the class imbalance. For model development, five-fold cross-validation and grid-search optimization were used. The accuracy, sensitivity, specificity, precision, AUC and F1-score were used to evaluate the performance. SHapley Additive exPlanations (SHAP) were used to interpret model predictions. All analyses were carried out with statistical software R (version 4.4.0). Results Among the models evaluated, XGBoost showed the best overall predictive performance followed by LightGBM and random forest. SHAP analysis gave an interpretable framework to analyze the contribution of individual predictors to depression predictions, and showed that depression risk is multifactorial. Conclusion Multidimensional population health information offers a promising way to predict depression with machine learning. Ensemble-based algorithms could be especially beneficial for the modeling of complex relationships that underlie depression risk, as XGBoost performed well in this study. Combining predictive modelling with SHAP interpretation can help in the more transparent and informative assessment of depression risk.
REFERENCES
[1].Balakrishna, N., Krishnan, M. B. M., & Ganesh, D. (2024). Hybrid Machine Learning Approaches for Predicting and Diag nosing Major Depressive Disorder. International Journal of Advanced Computer Science and Applications, 15(3). https://d oi.org/10.14569/ijacsa.2024.0150363 .
[2]Birk, J. L., Kronish, I. M., Moise, N., Falzon, L., Yoon, S., & Davidson, K. W. (2019). Depression and multimorbidity: Co nsidering temporal characteristics of the associations between depression and multiple chronic diseases. Health Psychology , 38(9), 802–811. https://doi.org/10.1037/hea0000737
[3]Dong, Y., Wen, H., Lu, C., Li, J., & Zheng, Q. (2025). Predicting depression risk with machine learning models: identifyin g familial, personal, and dietary determinants. BMC Psychiatry, 25(1). https://doi.org/10.1186/s12888-025-07182-8
[4].Gabarrell-Pascuet, A., Domènech-Abella, J., Rod, N. H., & Varga, T. V. (2023). Variations in sociodemographic and healt h-related factors are linked to distinct clusters of individuals with depression based on the PHQ-9 instrument: NHANES 20 07–2018. Journal of Affective Disorders, 335, 95–104. https://doi.org/10.1016/j.jad.2023.05.005
[5]. . Gabarrell-Pascuet, A., Domènech-Abella, J., Rod, N. H., & Varga, T. V. (2023). Variations in sociodemographic and healt h-related factors are linked to distinct clusters of individuals with depression based on the PHQ-9 instrument: NHANES 20 07–2018. Journal of Affective Disorders, 335, 95–104. https://doi.org/10.1016/j.jad.2023.05.005
[6]Gardner, R. M., Sultan, P., Bernert, R. A., & Simard, J. F. (2025). Trends in prevalence and treatment of antepartum and po stpartum depression in the United States: Data from the national health and nutrition examination survey (NHANES) 2007 to 2018. PLOS One, 20(4), e0322536. https://doi.org/10.1371/journal.pone.0322536
[7].Goodwin, R. D., Dierker, L. C., Wu, M., Galea, S., Hoven, C. W., & Weinberger, A. H. (2022). Trends in U.S. Depression Prevalence From 2015 to 2020: The Widening Treatment Gap. American Journal of Preventive Medicine, 63(5), 726–733. https://doi.org/10.1016/j.amepre.2022.05.014
[8].Hou, C.-Y., Tsai, Y.-C., Kuo, T.-N., & Shyu, I.-L. (2026). Joint impact of premature age at menopause and depression on mortality in older females: an NHANES analysis. Menopause. https://doi.org/10.1097/gme.0000000000002920
[9].Mardini, M. T., Khalil, G. E., Bai, C., DivaKaran, A. M., & Ray, J. M. (2025). Identifying Adolescent Depression and Anx iety Through Real-World Data and Social Determinants of Health: Machine Learning Model Development and Validation. JMIR Mental Health, 12, e66665–e66665. https://doi.org/10.2196/66665
[10]. Meghrajani, V. R., Marathe, M., Sharma, R., Potdukhe, A., Wanjari, M. B., & Taksande, A. B. (2023). A Comprehensive Analysis of Mental Health Problems in India and the Role of Mental Asylums. Cureus. https://doi.org/10.7759/cureus.4255 9
[11]. Mehltretter, J., Rollins, C., Benrimoh, D., Fratila, R., Perlman, K., Israel, S., Miresco, M., Wakid, M., & Turecki, G. (2020 ). Analysis of Features Selected by a Deep Learning Model for Differential Treatment Selection in Depression. Frontiers in Artificial Intelligence, 2. https://doi.org/10.3389/frai.2019.00031
[12]. Mirza, B., Wang, W., Wang, J., Choi, H., Chung, N. C., & Ping, P. (2019). Machine Learning and Integrative Analysis of Biomedical Big Data. Genes, 10(2), 87. https://doi.org/10.3390/genes10020087
[13]. Nohara, Y., Matsumoto, K., Soejima, H., & Nakashima, N. (2022). Explanation of machine learning models using shapley additive explanation and application for real data in hospital. Computer Methods and Programs in Biomedicine, 214, 10658 4. https://doi.org/10.1016/j.cmpb.2021.106584
[14]. Patel, J. S., Oh, Y., Rand, K. L., Wu, W., Cyders, M. A., Kroenke, K., & Stewart, J. C. (2019). Measurement invariance of the patient health questionnaire‐9 (PHQ‐9) depression screener in U.S. adults across sex, race/ethnicity, and education level : NHANES 2005–2016. Depression and Anxiety, 36(9), 813–823. Portico. https://doi.org/10.1002/da.22940
[15]. Qian, H., Song, S., Zhang, Z., Yuan, Y., & Zhang, L. (2025). A predictive model for depression risk in individuals with me tabolic dysfunction-associated steatotic liver disease: evidence from NHANES 2017–2023. Psychology, Health &Amp; Me dicine, 1–20. https://doi.org/10.1080/13548506.2025.2591861
[16]. Qiu, K., Liu, Y., Zhang, Y., Gu, J., & Huang, Y. (2025). The association between physical activity and depression among weekend catch-up sleepers: results from NHANES 2021–2023. BMC Psychiatry, 25(1). https://doi.org/10.1186/s12888-02 5-07095-6
[17]. Rahman, A., Debnath, T., Kundu, D., Khan, Md. S. I., Aishi, A. A., Sazzad, S., Sayduzzaman, M., & Band, S. S. (2024). M achine learning and deep learning-based approach in smart healthcare: Recent advances, applications, challenges and oppor tunities. AIMS Public Health, 11(1), 58–109. https://doi.org/10.3934/publichealth.2024004
[18]. Sahlaoui, H., Alaoui, E. A. A., Nayyar, A., Agoujil, S., & Jaber, M. M. (2021). Predicting and Interpreting Student Perform ance Using Ensemble Models and Shapley Additive Explanations. IEEE Access, 9, 152688–152703. https://doi.org/10.110 9/access.2021.3124270
[19]. Sinkewicz, M., Rostant, O., Zivin, K., McCammon, R., & Clarke, P. (2022). A life course view on depression: Social deter minants of depressive symptom trajectories over 25 Years of Americans’ Changing Lives. SSM - Population Health, 18, 10 1125. https://doi.org/10.1016/j.ssmph.2022.101125
[20]. Theng, D., & Bhoyar, K. K. (2023). Feature selection techniques for machine learning: a survey of more than two decades of research. Knowledge and Information Systems, 66(3), 1575–1637. https://doi.org/10.1007/s10115-023-02010-5
[21]. Thieme, A., Belgrave, D., & Doherty, G. (2020). Machine Learning in Mental Health. ACM Transactions on Computer-Hu man Interaction, 27(5), 1–53. https://doi.org/10.1145/3398069
[22]. Wan, L., & He, S. (2024). Association between depression and infertility based on the PHQ-9 score: Analyses of NHANES 2013–2018. Plos One, 19(7), e0305176. https://doi.org/10.1371/journal.pone.0305176
[23]. Wang, N., Wang, L., Wang, J., Chen, R., Shi, M., Liu, H., & Xu, X. (2023). Effects of physical activity and depressive sym ptoms on cognitive function in older adults: National Health and Nutrition Examination Survey. Neurological Sciences, 45( 1), 299–308. https://doi.org/10.1007/s10072-023-07250-5
[24]. Yadav, N., Gulati, A., Gulati, V., & Yadav, P. (2025). Evaluating the impact of machine learning models on adult major de pressive disorder using conventional treatment strategies: a systematic review approach. Discover Public Health, 22(1). htt ps://doi.org/10.1186/s12982-025-00816-y
[25]. Zhang, W., Wang, Y., Cong, Q., Tang, X., Wang, Z., & Wang, Z. (2026). Interaction effects of sedentary behavior and dep ression on MAFLD in NHANES 2017–2020 and 2021–2023. PLOS One, 21(2), e0342336. https://doi.org/10.1371/journal. pone.0342336
Depression, Machine Learning, Predictive Modelling, NHANES, PHQ-9, Xgboost, Lightgbm, Random Forest, SHAP.
Note : A published paper may take 4-5 working days from the publication date to appear in Rode, Semantic Scholar, and open alex.
