Over the past few decades, mental disorders such as depression have increased and become a serious public health issue. Many affected individuals choose not to seek professional support due to social stigma. Social media platforms like X provide opportunities to study mental health on a large scale because users often share their personal experiences and emotions. However, there are challenges in understanding language patterns and context in posts, necessitating appropriate techniques and models to effectively detect potential depressions. Utilizing Natural Language Processing (NLP) techniques, this study analyzes 37,554 texts from social media posts to detect potential depressions. This study employs the IndoBERT model, an adaptation of BERT trained on Indonesian text data, to identify potential depression from social media texts. Data were collected through scrapping using negatively and positively connotated keywords, which were consulted with psychiatrists. The text pre-processing includes case folding, text cleaning, spell normalization, stopword removal and stemming. The data were then labeled using the IndoBERT emotion classification model, categorizing negative emotions as depression and positive emotions as normal. The model was trained and evaluated using accuracy, precision, recall, and F1-score metrics, with the best results showing an accuracy of 94.91%, precision of 94.91%, recall of 94.91%, and an F1-score of 94.91%. The results indicate that the IndoBERT model is effective in detecting potential depression from social media texts. However, there are limitations due to the reliance on social media posts, which may not fully reflect the users’ emotional conditions.
                        
                        
                        
                        
                            
                                Copyrights © 2024