Abstract
The growing use of online platforms like Twitter and Reddit has created new opportunities in the field of mental health by enabling the analysis of language patterns in user-generated content. This study explores how transformer-based models such as Bidirectional Encoder Representations from Transformers (BERT), Generative Pre-trained Transformer (GPT-2), Robustly Optimized BERT Approach (RoBERTa), and Term Frequency-Inverse Document Frequency (TF-IDF) for text feature matrices can be applied to detect depressive symptoms in social media posts. The study utilizes machine learning algorithms, including Logistic Regression (LR), Random Forest, Support Vector Machine (SVM), Decision Tree, Naive Bayes, Multi-Layer Perceptron (MLP), and XGBoost, to improve the detection of depression-related markers in textual data. By leveraging annotated datasets specifically focused on depression, these models are trained to identify depression indicators in the language used by social media users. We employ supervised learning techniques to enhance model performance across various platforms, aiming to achieve greater accuracy and generalizability.