CFP last date
22 June 2026
Reseach Article

Random Forest-based Framework for Depression and Anxiety Prediction using DASS-21 Data

by Indraneel Das, Prabhat Pandey
International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
Volume 187 - Number 110
Year of Publication: 2026
Authors: Indraneel Das, Prabhat Pandey
10.5120/ijca9e4a14c08138

Indraneel Das, Prabhat Pandey . Random Forest-based Framework for Depression and Anxiety Prediction using DASS-21 Data. International Journal of Computer Applications. 187, 110 ( May 2026), 34-37. DOI=10.5120/ijca9e4a14c08138

@article{ 10.5120/ijca9e4a14c08138,
author = { Indraneel Das, Prabhat Pandey },
title = { Random Forest-based Framework for Depression and Anxiety Prediction using DASS-21 Data },
journal = { International Journal of Computer Applications },
issue_date = { May 2026 },
volume = { 187 },
number = { 110 },
month = { May },
year = { 2026 },
issn = { 0975-8887 },
pages = { 34-37 },
numpages = {9},
url = { https://ijcaonline.org/archives/volume187/number110/random-forest-based-framework-for-depression-and-anxiety-prediction-using-dass-21-data/ },
doi = { 10.5120/ijca9e4a14c08138 },
publisher = {Foundation of Computer Science (FCS), NY, USA},
address = {New York, USA}
}
%0 Journal Article
%1 2026-05-30T22:32:56.021986+05:30
%A Indraneel Das
%A Prabhat Pandey
%T Random Forest-based Framework for Depression and Anxiety Prediction using DASS-21 Data
%J International Journal of Computer Applications
%@ 0975-8887
%V 187
%N 110
%P 34-37
%D 2026
%I Foundation of Computer Science (FCS), NY, USA
Abstract

Mental health conditions such as depression and anxiety have a widespread prevalence rate across the globe, thus calling for reliable models that can facilitate accurate prediction. The current research aims to establish a Random Forest model to classify and predict depression and anxiety in terms of their severity levels based on the DASS-21 dataset. The data set comprises 21 questionnaire-based features corresponding to the emotional state of patients. These features undergo preprocessing based on missing value imputation, normalization, and encoding methods. The data is partitioned into training and testing data sets at a ratio of 80:20. Next, a Random Forest classifier is trained to classify patients into various levels of depression and anxiety. The experimental outcomes reveal that the developed approach exhibits high prediction accuracy with 97% accuracy, and the precision, recall, and F1 scores are equally good. The model's stability is confirmed using confusion matrix evaluation, where misclassification between severity levels is negligible. In addition, there is an analysis of the importance of the characteristics that influence the results of the predictions. This increases the visibility of the model and helps to understand which psychological factors are essential. It becomes clear that the use of the Random Forest algorithm for predicting mental disorders can be quite effective.

References
  1. World Health Organization, “Mental health: strengthening our response,” 2022.
  2. L. Breiman, “Random Forests,” Machine Learning, vol. 45, no. 1, pp. 5–32, 2001.
  3. T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning, Springer, 2009.
  4. J. Han, M. Kamber, and J. Pei, Data Mining: Concepts and Techniques, Morgan Kaufmann, 2011.
  5. I. H. Witten, E. Frank, and M. A. Hall, Data Mining: Practical Machine Learning Tools and Techniques, 3rd ed., Morgan Kaufmann, 2016.
  6. S. R. Steyerberg, Clinical Prediction Models, Springer, 2019.
  7. A. Krogh, “What are artificial neural networks?” Nature Biotechnology, vol. 26, pp. 195–197, 2008.
  8. A. T. Beck, “Depression: Clinical, Experimental, and Theoretical Aspects,” Harper & Row, 1967.
  9. P. J. Lovibond and S. H. Lovibond, “The structure of negative emotional states: Comparison of the DASS with the Beck Depression and Anxiety Inventories,” Behaviour Research and Therapy, vol. 33, no. 3, pp. 335–343, 1995.
  10. S. H. Lovibond and P. F. Lovibond, “Manual for the Depression Anxiety Stress Scales,” Psychology Foundation, 1995.
  11. D. Dua and C. Graff, “UCI Machine Learning Repository,” University of California, Irvine, 2019.
  12. F. Pedregosa et al., “Scikit-learn: Machine Learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.
  13. J. Brownlee, Machine Learning Mastery with Python, Machine Learning Mastery, 2016.
  14. T. Lu, X. Liu, J. Sun, Y. Bao, B. W. Schuller, and L. Lu, “Bridging the gap between artificial intelligence and mental health,” Science Bulletin, vol. 68, no. 15, pp. 1606–1610, 2023.
  15. K. Shimada, “The Role of Artificial Intelligence in Mental Health: A Review,” Science Insights, vol. 5, pp. 1119–1127, 2023.
  16. A. Thakkar, A. Gupta, and A. De Sousa, “Artificial intelligence in positive mental health: A narrative review,” Frontiers in Digital Health, 2024.
  17. B. Kadirvelu et al., “Digital phenotyping for adolescent mental health prediction using machine learning,” 2025.
  18. M. N. Nguyen et al., “Wearable sensor-based dataset for mental health assessment using machine learning,” 2025.
Index Terms

Computer Science
Information Sciences

Keywords

Random Forest Mental Health Prediction Depression Detection Anxiety Classification DASS-21 Dataset Machine Learning