Chatbot for Mental Health Using Tf-Idf and SVM
Abstract
This research aims to develop a chatbot for mental health by using the term frequency-inverse frequency (Tf-Idf) technique to represent text and support vector machines (SVM) for classification. This chatbot is designed to provide support and information to users seeking help with mental health issues. The dataset used to train the model includes mental health-related conversations, including conversations between mental health professionals and patients, as well as general conversations about mental health. The chatbot interface allows users to input their questions or concerns, which are then processed using Tf-Idf to vectorize the text data. These features are fed into an SVM model for classification, determining the appropriate response type, such as depression, anxiety, or general advice. Chatbot responses are generated based on the classification results, providing relevant information and support to the user. Chatbots are deployed on a platform where users can interact with them, and their performance is evaluated using metrics such as accuracy, precision, gain, and F1 score.
Keywords
Full Text:
UntitledReferences
Abd-Alrazaq AA, Rababeh A, Alajlani M, Bewick BM, Househ M. Effectiveness and Safety of Using Chatbots to Improve Mental Health: Systematic Review and Meta-Analysis. J Med Internet Res. 2020 Jul 13;22(7):e16021. doi: 10.2196/16021. PMID: 32673216; PMCID: PMC7385637.
Nayar, A.M., Attar, Z., Kachwala, S., Biswas, T., & Wagh, S.K. (2022). Dost-Mental Health Assistant Chatbot. 2022 5th International Conference on Advances in Science and Technology (ICAST), 252-257.
He, Y., Yang, L., Zhu, X., Wu, B., Zhang, S., Qian, C., & Tian, T. (2022). Mental Health Chatbot for Young Adults With Depressive Symptoms During the COVID-19 Pandemic: Single-Blind, Three-Arm Randomized Controlled Trial. Journal of medical Internet research, 24(11), e40719. https://doi.org/10.2196/40719
R. Wang, J. Wang, Y. Liao and J. Wang, "Supervised Machine Learning Chatbots for Perinatal Mental Healthcare," 2020 International Conference on Intelligent Computing and Human-Computer Interaction (ICHCI), Sanya, China, 2020, pp. 378-383, doi: 10.1109/ICHCI51889.2020.00086.
H. Zhou, “Research of Text Classification Based on TF-IDF and CNN-LSTM,” J. Phys. Conf. Ser., vol. 2171, no. 1, pp. 218–222, 2022, doi: 10.1088/1742-6596/2171/1/012021.
S. Qaiser and R. Ali, “Text Mining: Use of TF-IDF to Examine the Relevance of Words to Documents,” Int. J. Comput. Appl., vol. 181, no. 1, pp. 25–29, 2018, doi: 10.5120/ijca2018917395.
K. Anwar, J. Siddiqui, and S. Saquib Sohail, “Machine Learning Techniques for Book Recommendation: An Overview,” SSRN Electron. J., pp. 1291–1297, 2019, doi: 10.2139/ssrn.3356349.
A. Pratama, R. Wihandika, and D. Eka Ratnawati, “Implementasi Algoritme Support Vector Machine (SVM) untuk Prediksi Ketepatan Waktu Kelulusan Mahasiswa,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 2, pp. 1704–1708, Apr. 2018.
DOI: http://dx.doi.org/10.33021/itfs.v9i2.5746
Refbacks
- There are currently no refbacks.
Copyright (c) 2024 IT for Society
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
All articles in this journal are indexed in:
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.