Skip to main content
Log in

Multiclass Classification of Mental Health Disorders Using XGBoost-HOA Algorithm

  • Original Research
  • Published:
SN Computer Science Aims and scope Submit manuscript

Abstract

The combination of extreme gradient boosting (XGBoost) and hippopotamus optimization algorithm (HOA) (XGBoost-HOA) was proposed for the multiclass classification of mental health disorders. The dataset considered for experimentation comprises 5019 records. This dataset contains 2487 records of females and 2532 records of males. It contains the records related to depression, anxiety, and stress disorders. The class imbalance problem was addressed by synthetic minority over-sampling technique (SMOTE). The XGBoost-HOA algorithm was applied to choose the most suitable hyperparameters and enhance class sensitivity while mitigating overfitting. The performance measures, considered for experimentation are accuracy, precision, recall, and F1-score. These are computed for the binary, three-class, four-class, and five-class classifications of depression, anxiety, and stress. The results demonstrate that the XGBoost-HOA algorithm possesses strong classification abilities, namely in the identification of depression and anxiety. When considering multifactor analysis, it attains accuracy up to 81%, precision up to 100%, recall up to 100%, and F1-scores up to 91%. The classification results in case of stress are lower in comparison to depression and anxiety. For depression, the receiver operating characteristic (ROC) curves indicate high area under the ROC curve (AUC) values, particularly for class 1 (AUC = 1.00) and class 5 (AUC = 0.95). Regarding anxiety, the ROC curves exhibit good performance, as indicated by high AUC values of 1.00 for class 1 and 0.93 for class 2. The ROC curves indicate that the performance for stress is moderate, with lower AUCs for certain classes, such as class 4 (AUC = 0.73). Overall, the XGBoost-HOA shows good results, except for occasional misclassification in some classes.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Data Availability

The dataset, owing to ethical and legal constraints imposed by the Hospital, the data cannot be made publicly available.

References

  1. https://www.who.int/news-room/fact-sheets/detail/mental-disorders. Accessed 10 Jan 2024.

  2. Wu Y, Wang L, Tao M, Cao H, Yuan H, Ye M, Chen X, Wang K, Zhu C. Changing trends in the global burden of mental disorders from 1990 to 2019 and predicted levels in 25 years. Epidemiol Psychiatr Sci. 2023;32: e63.

    Article  Google Scholar 

  3. Kumar P, Garg S, Garg A. Assessment of anxiety, depression and stress using machine learning models. Procedia Comput Sci. 2020;1(171):1989–98.

    Article  Google Scholar 

  4. Vindegaard N, Benros ME. COVID-19 pandemic and mental health consequences: systematic review of the current evidence. Brain Behav Immun. 2020;1(89):531–42.

    Article  Google Scholar 

  5. Ibrahim EN, Jamali N, Suhaimi AI. Exploring gamification design elements for mental health support. Int J Adv Technol Eng Explor. 2021;8(74):114.

    Google Scholar 

  6. Talevi D, Socci V, Carai M, Carnaghi G, Faleri S, Trebbi E, Di Bernardo A, Capelli F, Pacitti F. Mental health outcomes of the CoViD-19 pandemic. Riv Psichiatria. 2020;55(3):137–44.

    Google Scholar 

  7. Liu Y, Hankey J, Cao B, Chokka P. Screening for major depressive disorder in a tertiary mental health centre using EarlyDetect: a machine learning-based pilot study. J Affect Disord Rep. 2021;1(3): 100062.

    Article  Google Scholar 

  8. Brennan BP, Hudson JI. Applications of machine learning to improve diagnosis, advance treatment, and identify causal factors for mental disorders. Biol Psychiatry Cognit Neurosci Neuroimaging. 2022;7(7):635–7.

    Article  Google Scholar 

  9. Thakur B, Kumar N, Gupta G. Machine learning techniques with ANOVA for the prediction of breast cancer. Int J Adv Technol Eng Explor. 2022;9(87):232.

    Google Scholar 

  10. Zhang W, Kong L, Lee S, Chen Y, Zhang G, Wang H, Song M. Detecting mental and physical disorders using multi-task learning equipped with knowledge graph attention network. Artif Intell Med. 2024;14: 102812.

    Article  Google Scholar 

  11. Shambhu S, Koundal D, Das P, Sharma C. Binary classification of covid-19 CT images using CNN: Covid diagnosis using CT. Int J E-Health Med Commun. 2021;13(2):1–3.

    Article  Google Scholar 

  12. Wei Q, Dong W, Yu D, Wang K, Yang T, Xiao Y, Long D, Xiong H, Chen J, Xu X, Li T. Early identification of autism spectrum disorder based on machine learning with eye-tracking data. J Affect Disord. 2024;1(358):326–34.

    Article  Google Scholar 

  13. Janczewski CE, Nitkowski J. Predicting mental and behavioral health service utilization among child welfare-involved caregivers: a machine learning approach. Child Youth Serv Rev. 2023;1(155): 107150.

    Article  Google Scholar 

  14. Chen B, Sun X, Huang H, Feng C, Wu D, Chen W. An integrated machine learning framework for developing and validating a diagnostic model of major depressive disorder based on interstitial cystitis-related genes. J Affect Disord. 2024;359:22–32.

    Article  Google Scholar 

  15. Gallo S, El-Gazzar A, Zhutovsky P, Thomas RM, Javaheripour N, Li M, Bartova L, Bathula D, Dannlowski U, Davey C, Frodl T. Functional connectivity signatures of major depressive disorder: machine learning analysis of two multicenter neuroimaging studies. Mol Psychiatry. 2023;28(7):3013–22.

    Article  Google Scholar 

  16. Ran MS, Wang C, Cai J, Deng ZY, Mu YF, Huang Y, Zhang W, Song HJ, Deng AP, Qiu CJ, Shen WW. The mutual overlapping impact of stress and infection on mental health problems in adolescents and youths during and after COVID-19 pandemic in China. J Affect Disord. 2024;15(347):500–8.

    Article  Google Scholar 

  17. Li S, Shi J, Shao C, Sznajder KK, Wu H, Yang X. Predicting depression, anxiety, and their comorbidity among patients with breast cancer in china using machine learning: a multisite cross-sectional study. Depress Anxiety. 2024;2024(1):3923160.

    Article  Google Scholar 

  18. Bhavani BH, Naveen NC. An approach to determine and categorize mental health condition using machine learning and deep learning models. Eng Technol Appl Sci Res. 2024;14(2):13780–6.

    Article  Google Scholar 

  19. Yadav G, Bokhari MU. Hybrid classifier for optimizing mental health prediction: feature engineering and fusion technique. Int J Ment Health Addict. 2024;21:1–41.

    Google Scholar 

  20. Chahar R, Dubey AK, Narang SK. An efficient KNN algorithm for the mental health performance assessment using K-means clustering. In: International Conference on Emerging Research in Computing, Information, Communication and Applications. Singapore: Springer Nature Singapore; 2023. p. 575–86.

  21. Melendez-Armenta RA, Chontal GL, Aburto SG. Using machine learning to analyze mental health in distance education during the COVID-19 pandemic: an opinion study from university students in Mexico. PeerJ Comput Sci. 2024;8(10): e2241.

    Article  Google Scholar 

  22. Indriyani Y, Susanti N. Model of binary logistic regression to predict mental health in college students. J Educ Innov Public Health. 2024;2(1):270–81.

    Article  Google Scholar 

  23. Zhao Y, An Y, Tan X, Li X. Mental health and its influencing factors among self-isolating ordinary citizens during the beginning epidemic of COVID-19. In: Loss and trauma in the COVID-19 era. London: Routledge; 2024. p. 79–92.

    Google Scholar 

  24. Yu DJ, Wing YK, Li TM, Chan NY. The impact of social media use on sleep and mental health in youth: a scoping review. Curr Psychiatry Rep. 2024;26(3):104–19.

    Article  Google Scholar 

  25. Mürner-Lavanchy I, Koenig J, Reichl C, Josi J, Cavelti M, Kaess M. The quest for a biological phenotype of adolescent non-suicidal self-injury: a machine-learning approach. Transl Psychiatry. 2024;14(1):56.

    Article  Google Scholar 

  26. Khalil SS, Tawfik NS, Spruit M. Exploring the potential of federated learning in mental health research: a systematic literature review. Appl Intell. 2024;12:1–8.

    Google Scholar 

  27. Shimamoto M, Ishizuka K, Ohtani K, Inada T, Yamamoto M, Tachibana M, Kimura H, Sakai Y, Kobayashi K, Ozaki N, Ikeda M. Machine learning algorithm-based estimation model for the severity of depression assessed using Montgomery–Asberg depression rating scale. Neuropsychopharmacol Rep. 2024;44(1):115–20.

    Article  Google Scholar 

  28. Luo J, Chen Y, Tao Y, Xu Y, Yu K, Liu R, Jiang Y, Cai C, Mao Y, Li J, Yang Z. Major depressive disorder prediction based on sleep-wake disorders symptoms in US adolescents: a machine learning approach from national sleep research resource. Psychol Res Behav Manag. 2024;31:691–703.

    Article  Google Scholar 

  29. Uslu S, Tangermann M, Vögele C. Estimating person-specific neural correlates of mental rotation: a machine learning approach. PLoS ONE. 2024;19(1): e0289094.

    Article  Google Scholar 

  30. Pourkeyvan A, Safa R, Sorourkhah A. Harnessing the power of hugging face transformers for predicting mental health disorders in social networks. IEEE Access. 2024;16(12):28025–35.

    Article  Google Scholar 

  31. Dhariwal N, Sengupta N, Madiajagan M, Patro KK, Kumari PL, Abdel Samee N, Tadeusiewicz R, Pławiak P, Prakash AJ. A pilot study on AI-driven approaches for classification of mental health disorders. Front Hum Neurosci. 2024;10(18):1376338.

    Article  Google Scholar 

  32. Pendyala V, Kim H. Assessing the reliability of machine learning models applied to the mental health domain using explainable AI. Electronics. 2024;13(6):1025.

    Article  Google Scholar 

  33. Birner A, Mairinger M, Elst C, Maget A, Fellendorf FT, Platzer M, Queissner R, Lenger M, Tmava‐Berisha A, Bengesser SA, Reininghaus EZ. Machine‐based learning of multidimensional data in bipolar disorder–pilot results. Bipolar Disord. 2024.

  34. Acharya N, Kar P, Ally M, Soar J. Predicting co-occurring mental health and substance use disorders in women: an automated machine learning approach. Appl Sci. 2024;14(4):1630.

    Article  Google Scholar 

  35. Khan UA, Kauttonen J, Henttonen P, Määttänen I. Understanding the impact of sisu on workforce and well-being: a machine learning-based analysis. Heliyon. 2024;10(2).

  36. Ferrario A, Demiray B. Understanding reminiscence and its negative functions in the everyday conversations of young adults: a machine learning approach. Heliyon. 2024:10(1).

  37. Gentili E, Franchini G, Zese R, Alberti M, Ferrara M, Domenicano I, Grassi L. Machine learning from real data: a mental health registry case study. Comput Methods Progr Biomed Update. 2024;1(5): 100132.

    Article  Google Scholar 

  38. Khan A, Ali R. Unraveling minds in the digital era: a review on mapping mental health disorders through machine learning techniques using online social media. Soc Netw Anal Min. 2024;14(1):1–33.

    Article  Google Scholar 

  39. Kumar G, Das T, Singh K. Early detection of depression through facial expression recognition and electroencephalogram-based artificial intelligence-assisted graphical user interface. Neural Comput Appl. 2024;15:1–8.

    Google Scholar 

  40. Gupta S, Agarwal G, Agarwal S, Pandey D. Depression detection using cascaded attention based deep learning framework using speech data. Multimed Tools Appl. 2024;22:1–39.

    Google Scholar 

  41. Baygin M, Barua PD, Dogan S, Tuncer T, Hong TJ, March S, Tan RS, Molinari F, Acharya UR. Automated anxiety detection using probabilistic binary pattern with ECG signals. Comput Methods Progr Biomed. 2024;247: 108076.

    Article  Google Scholar 

  42. Katiyar K, Fatma H, Singh S. Predicting anxiety, depression and stress in women using machine learning algorithms. In: Combating women’s health issues with machine learning. Boca Raton: CRC Press; 2024. p. 22–40.

    Google Scholar 

  43. Rehmani F, Shaheen Q, Anwar M, Faheem M, Bhatti SS. Depression detection with machine learning of structural and non‐structural dual languages. Healthc Technol Lett. 2024.

  44. Upadhyay DK, Mohapatra S, Singh NK. An early assessment of persistent depression disorder using machine learning algorithm. Multimed Tools Appl. 2024;83(16):49149–71.

    Article  Google Scholar 

  45. Lilhore UK, Dalal S, Faujdar N, Simaiya S, Dahiya M, Tomar S, Hashmi A. Unveiling the prevalence and risk factors of early stage postpartum depression: a hybrid deep learning approach. Multimed Tools Appl. 2024;25:1–35.

    Google Scholar 

  46. Tejaswini V, Sathya Babu K, Sahoo B. Depression detection from social media text analysis using natural language processing techniques and hybrid deep learning model. ACM Trans Asian Low-Resour Lang Inf Process. 2024;23(1):1–20.

    Article  Google Scholar 

  47. Zheng C, Zhang T, Chen X, Zhang H, Wan J, Wu B. Assessing learners’ English public speaking anxiety with multimodal deep learning technologies. Comput Assist Lang Learn. 2024;2:1–29.

    Article  Google Scholar 

  48. Ma S, Xie X, Deng Z, Wang W, Xiang D, Yao L, Kang L, Xu S, Wang H, Wang G, Yang J. A machine learning analysis of big metabolomics data for classifying depression: model development and validation. Biol Psychiatry. 2024;96(1):44–56.

    Article  Google Scholar 

  49. Saunders R, Moinian D, Stott J, Delamain H, Naqvi SA, Singh S, Wheatley J, Pilling S, Buckman JE. Measurement invariance of the PHQ-9 and GAD-7 across males and females seeking treatment for common mental health disorders. BMC Psychiatry. 2023;23(1):298.

    Article  Google Scholar 

  50. Asselman A, Khaldi M, Aammou S. Enhancing the prediction of student performance based on the machine learning XGBoost algorithm. Interact Learn Environ. 2023;31(6):3360–79.

    Article  Google Scholar 

  51. Amiri MH, Mehrabi Hashjin N, Montazeri M, Mirjalili S, Khodadadi N. Hippopotamus optimization algorithm: a novel nature-inspired optimization algorithm. Sci Rep. 2024;14(1):5032.

    Article  Google Scholar 

  52. https://www.kaggle.com/datasets/osmi/mental-health-in-tech-survey. Accessed 18 Aug 2024.

  53. Lohia A, Ranjith A, Sachdeva A, Bhat A. An ensemble technique to analyse mental health of workforce in the corporate sector. In: 2023 7th International Conference on Intelligent Computing and Control Systems (ICICCS). IEEE; 2023. p. 1245–51.

  54. Renugadevi R, Sivabalan S, Sk SS, Priya SS, Sree Y, Naidu GR. Predicting mental health through machine learning algorithms. In: 2023 9th International Conference on Smart Structures and Systems (ICSSS). IEEE; 2023. p. 1–5.

  55. Sujal BH, Neelima K, Deepanjali C, Bhuvanashree P, Duraipandian K, Rajan S, Sathiyanarayanan M. Mental health analysis of employees using machine learning techniques. In: 2022 14th International Conference on COMmunication Systems & NETworkS (COMSNETS). IEEE; 2022. p. 1–6.

Download references

Acknowledgements

We would like to express our gratitude to Dr. Manoj Kumar, Addl. SMO (Psychiatrist) at Civil Hospital, Panchkula, Haryana, for his assistance in understanding and creating the dataset.

Funding

There are no sources of funding for the research.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ashutosh Kumar Dubey.

Ethics declarations

Conflict of interest

We have no conflicts of interest to disclose.

Research involving human and/or animals

Not applicable.

Informed consent

Not applicable.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chahar, R., Dubey, A.K. & Narang, S.K. Multiclass Classification of Mental Health Disorders Using XGBoost-HOA Algorithm. SN COMPUT. SCI. 5, 1167 (2024). https://doi.org/10.1007/s42979-024-03525-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s42979-024-03525-6

Keywords

Navigation