A Hybrid Approach for Depression Classification Using BERT and SVM
摘要
Depression is a major global mental health issue that impacts millions of individuals. The complexity of depression symptoms makes it challenging to diagnose and treat effectively. Existing methods for depression diagnosis, such as clinical interviews and questionnaires, can be time-consuming, costly, and subject to human error. Therefore, there is a need for automated methods that can accurately and efficiently detect and classify depression from written long text. The objective of this research is to develop a machine learning algorithm that can accurately differentiate between individuals with depression and those without by analyzing their written language. To achieve this goal, a multi-model approach was used, combining Bidirectional Encoder Representations from Transformers (BERT) for feature extraction and Support Vector Machines (SVM) for classification. The dataset used for this study was the Reddit mental health dataset, which comprised 35,708 posts categorized as “not depression” or “depression”, with their labels transformed into binary format (0 and 1 respectively). These sentences are long texts. Our approach involves using BERT to extract contextualized features from the text and SVM to classify the depression status based on those features. The performance of the model is assessed using metrics including accuracy, precision, recall, and F1 score. The results demonstrate that the multi-model technique using BERT and SVM can effectively classify depression in text with a high accuracy of around 92%, precision is 92.05%, recall is 91.94% and f1 score is also 92%. For academics and professionals involved in mental health and natural language processing, this paper offers useful insights.