Angelin Jeba P, Jemima Jebaseeli T., Selvarathi M., Achal Shaji, Ivine Thomas, Agilesh Vigram S.
Social media websites are popular, and it is now possible to collect a significant amount of behavioral data in real time. This has made it possible to conduct research on mental health. This study proposes a machine learning framework to identify and predict mental health issues, such as emotion and cognition, related to social media with respect to depression, anxiety, and bipolar disorder. In this study, three social media datasets were used, each with more than 1.6 million posts: Sentiment140, Twitter Depression Dataset, and Facebook Sentiment. The data was tokenized and lemmatized, and stopwords were removed. We used BERT, a transformer model, to view the data using emotional traits. This was done using the sentimental polarity score and emotions such as grief, anger, joy, fear, and insignificance. We used Latent Dirichlet Allocation (LDA) and Linguistic Inquiry and Word Count (LIWC) to infer cognitive distortions and psychological indices. We used Recursive Feature Elimination (RFE) for feature selection and a Random Forest classifier to predict mental health across multiple classes. The proposed method is more effective than deep learning and machine learning techniques, achieving an accuracy of 95.0%, precision of 94.0%, recall of 93.7%, F1-score of 94.8%, and AUC-ROC of 98.9%. The sentiment polarity score improved the prediction by 28%, the emotional scores improved the prediction by 35%, the cognitive themes improved the prediction by 22%, and the LIWC features improved the prediction by 15%. The results indicate that the use of cognitive linguistics and emotional representation facilitates the identification of early symptoms of severe depression and bipolar disorder.