Twitter sentiment analysis for depression detection using machine learning algorithms
Rajvir Kaur, Sarneet Kaur, Syed Mufassir Yassen · 2023
Social media sites like Facebook, Instagram, and Twitter have transformed our world forever because there are more internet users in the present era. The most prevalent mental health conditions affecting people globally throughout time are stress, anxiety, and depression. This work uses support vector machine, random forest, and logistic regression among other machine learning methods to identify depression on Twitter. Tweets are first downloaded from Twitter in order to build the model, and preprocessed tweets are then used for sentiment analysis. The resulting dataset is then split into 80:20 ratios in order to use machine learning methods to identify the number of depressed and non-depressed tweets. The performance of machine learning algorithms is then analyzed and compared using various evaluation matrices such as accuracy, precision, recall, and F1 score. The results showed that the random forest algorithm achieves the highest prediction accuracy of 90%.