Deteksi Depresi dan Kecemasan pada Data Tekstual Menggunakan Long Short-Term Memory (LSTM)
Abstract
Mental health is crucial for decision-making, relationship-building, and daily life. Disorders like depression and anxiety are often undiagnosed and untreated. This study aims to use Long Short-Term Memory (LSTM) algorithms to detect depression and anxiety in social media text data. The study begins with collecting text data from kaggle, containing expressions of personal feelings. This data undergoes a series of pre-processing steps, including data cleaning, emoji replacement, case folding, punctuation removal, tokenization, normalization, stopword removal, and lemmatization. Key text features are extracted using word embedding methods, specifically Word2Vec, to capture the semantic meaning of words. The LSTM model is built using the Keras or TensorFlow framework and evaluated using metrics such as accuracy, precision, recall, and F1 score. The model is then tested on real twitter data, which is again pre-processed before being used to detect depression and anxiety. Detection results show the percentage of tweets from each username indicating depression or anxiety, categorized by depression levels. The study found that the LSTM algorithm effectively detects depression and anxiety with an accuracy of 89% on an 80%-20% data split. Implementing this technology enables early detection of mental disorders, providing timely assistance, and enhancing mental health awareness and support on online platforms.