Cognitive Therapy and Routine Recommendation System (CTRRS): An AI-Driven Approach for Mental Health

Authors

DOI:

https://doi.org/10.21015/vtse.v12i4.1976

Abstract

Depression detection and management is an important research field nowadays. In this research work, Cognitive Therapy and Routine Recommendation System (CTRRS) is proposed. It automates the process of detecting depression and provides personalized mental health recommendations using a Random Forest model for healthcare activities and a Long Short-Term Memory (LSTM) model for sentiment analysis. The LSTM architecture includes dense layers, bidirectional LSTM layers, and embedding layers, with term frequency-inverse document frequency (TF-IDF) vectorization and early stopping to prevent overfitting. Furthermore, a Voting Classifier improves classification performance by combining the advantages of multiple models. The system's evaluation is centered on accuracy, precision, recall, and F1-score, with confusion matrices offering in-depth analysis. Finally, CTRRS uses a cosine similarity algorithm to customize content to user preferences, increasing engagement. The study integrates machine learning and deep learning by employing a Random Forest model for healthcare activity recommendations and an LSTM model for sentiment analysis and depression detection. This combination leverages the strengths of both approaches to enhance the system's overall performance. Additionally, ensemble learning techniques such as bagging, boosting, and stacking are utilized to balance performance trade-offs and improve predictive accuracy. The LSTM model achieved 96.38% accuracy, 98.10% precision, 94.50% recall, and a 96.27% F1-score, which are important findings. Through user-friendly visualizations (PHQ-9 survey responses, word clouds highlighting frequent terms in depression-related texts, bar charts displaying top TF-IDF features, and confusion matrices for model performance evaluation), CTRRS enables users to monitor their progress in terms of mental health and compliance with recommendations. This research advances mental health care by providing a solution that is stigma-free, scalable, and accessible.

References

S. J. Teague, D. M. Hutchinson, and A. B. R. Shatte, “An overview of the methods and uses of machine learning in the field of mental health,” *Psychological Medicine*, vol. 50, no. 9, pp. 1426–1448, 2020.

K. L. Lix, A. G. Reece, A. J. Reagan, P. S. Dodds, C. M. Danforth, and E. J. Langer, “Using information from Twitter to forecast the onset and progression of mental illness,” *Scientific Reports*, vol. 10, no. 1, p. 13006, 2020.

S. C. Guntuku, M. L. Kern, D. B. Yaden, L. H. Ungar, and J. C. Eichstaedt, “A comprehensive assessment to detect depression and mental disease on social media,” *Behavioral Sciences Current Opinion*, vol. 34, pp. 43–49, 2021.

S. Hochreiter and J. Schmidhuber, “Extended short-term memory,” *Neural Computation*, vol. 9, no. 8, pp. 1735–1780, 1997.

A. H. Orabi, D. Inkpen, P. Buddhitha, and M. Husseini Orabi, “Deep learning to detect sadness among Twitter users,” in *Records of the 7th Workshop on Clinical Psychology and Computational Linguistics*, pp. 88–97, 2020.

L. Sun, Y. Lin, J. Tang, and B. Yuan, “Sentiment analysis using deep LSTM networks,” in *IEEE International Conference on Multimedia and Expo (ICME)*, Proceedings, pp. 1055–1060, 2020.

L. Breiman, “Random forests,” *Machine Learning*, vol. 55, no. 1, pp. 5–32, 2020.

Y. Chen, G. Weber, and J. E. Argentinis, “IBM Watson: Leveraging cognitive computing to address large data issues in health sciences research,” *Clinical Therapeutics*, vol. 43, no. 4, pp. 688–701, 2021.

A. López, F. Amato, J. Havel, P. Vaňhara, and A. Hampl, “Using artificial neural networks for the diagnosis of illness,” *Journal of Applied Biomedicine*, vol. 18, no. 2, pp. 47–58, 2020.

T. G. Dietterich, “Ensemble methods to machine learning,” in *5th International Workshop on Multiple Classifier Systems Proceedings*, pp. 1–15, 2020.

A. Yates, N. Goharian, and A. Cohan, “Risk assessment for despair and self-harm in online forums,” in *Empirical Methodologies in Natural Language Processing (EMNLP) Conference Proceedings*, pp. 2968–2978, 2021.

J. Li, F. Nhabtah, T. Nguyen, and T. Cheng, “Contrasting several methods for utilizing an online questionnaire to predict depression levels,” *BMC Medical Informatics and Decision Making*, vol. 20, no. 1, p. 75, 2020.

L. Rokach, B. Shapira, and F. Ricci, *Overview of recommender systems*, Springer US, 2021.

Y. Zhang, X. Liu, and Y. Zhang, “Content-based filtering to provide tailored mental health advice,” in *Proceedings of the 2021 IEEE International Conference on Healthcare Informatics (ICHI)*, pp. 1–9, 2021.

T. Mikolov, K. Chen, G. Corrado, and J. Dean, “Effective estimate of vector space word representations,” *arXiv*, 2020. arXiv:2001.00616.

Y. Bengio, G. Hinton, and Y. LeCun, “Deep learning,” *Nature*, vol. 580, no. 7808, pp. 436–444, 2020.

D. P. Kingma and J. Ba, “Adam: A method of stochastic optimization,” *arXiv*, 2020. arXiv:2001.00146.

C. Thiele, P. Gerhardstein, R. von Brachel, and G. Hirschfeld, “Unknown title,” *Unknown Journal*, 2017.

C. Sammut and G. I. Webb, *The Encyclopedia of Machine Learning*, Business & Science Media, Springer, 2021.

Y. Zhang, J. Liu, and S. Wang, “Context-aware online learning enables personalized depression diagnosis,” *IEEE Transactions on Knowledge and Data Engineering*, vol. 30, no. 11, pp. 1992–2004, 2018.

S. Wang, Y. Zhang, and J. Liu, “Online learning that is context-aware allows for customized diagnosis of depression,” *IEEE Transactions on Knowledge and Data Engineering*, vol. 32, no. 11, pp. 1992–2004, 2021.

R. J. Booth, J. W. Pennebaker, and M. E. Francis, *Language Study and Word Count: LIWC2021*, LIWC.net, Austin, Texas, 2021.

J. H. Friedman, “An apparatus that boosts gradients to approximate the greedy function,” *The Annals of Statistics*, vol. 48, no. 4, pp. 1189–1232, 2021.

C. D. Manning, H. Schütze, and P. Raghavan, *Overview of Information Retrieval*, Cambridge University Press, 2021.

G. Chandrashekar and F. Sahin, “A poll about feature-picking techniques,” *Computers & Electrical Engineering*, vol. 78, no. 1, pp. 16–28, 2021.

M. Hasan, A. Hassan, and A. Mahmood, “Sentiment analysis using hybrid machine learning algorithms on data from social media,” *International Journal of Advanced Computer Science and Applications*, vol. 11, no. 1, pp. 112–118, 2020.

I. Bose and S. Dutta, “Ramco Cements Ltd. Managing a large-scale data project,” *Journal of Information Technology Teaching Cases*, vol. 9, no. 2, pp. 67–76, 2021.

A. Y. Ng, M. I. Jordan, and D. M. Blei, “Latent Dirichlet Allocation,” *Journal of Machine Learning Research*, vol. 22, no. 1, pp. 993–1022, 2021.

A. Hassan and A. Mahmood, “Developments and difficulties in natural language processing using deep learning,” *arXiv*, 2021. arXiv:2101.0061.

Downloads

Published

2024-12-31

How to Cite

Shah, Y. A., Um-e-Aimen, Bushra, R., Khalil, A., Ali Shahbaz, S., & Ali Javed, M. (2024). Cognitive Therapy and Routine Recommendation System (CTRRS): An AI-Driven Approach for Mental Health. VFAST Transactions on Software Engineering, 12(4), 282–301. https://doi.org/10.21015/vtse.v12i4.1976