Skip to content

mnusrat786/Multiclass-Depression-Detection-of-Tweets-using-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Multiclass Depression Detection of Tweets using AI

Depression is a significant issue nowadays. As per the World Health Organization (WHO), in 2023, over 280 million individuals are grappling with depression. This is a huge number; if not taken seriously, these numbers will increase rapidly. About 4.89 billion individuals are social media users. People express their feelings and emotions on platforms like Twitter, Facebook, Reddit, Instagram, etc. These platforms contain valuable information which can be used for research purposes. Considerable research has been conducted across various social media platforms. However, certain limitations persist in these endeavors. Particularly, previous studies were only focused on detecting depression and the intensity of depression in tweets. Also, there existed inaccuracies in dataset labeling. In this research work, five types of depression (Bipolar, major, psychotic, atypical, and postpartum) were predicted using tweets from the Twitter database based on lexicon labeling. Explainable AI was used to provide reasoning by highlighting the parts of tweets that represent that type of depression. Bidirectional Encoder Representations from Transformers (BERT) was used for feature extraction and training. Machine learning and deep learning methodologies were used to train the model. The BERT model presented the most promising results, achieving an overall accuracy of 0.96.

Pipeline

image

Dataset

The dataset is available for research purposes. You can email me at osamanusrat786@gmail.com to request dataset access.

There are 14,317 tweets and six classes in the dataset.

• Bipolar depression
• Psychotic depression
• Atypical depression
• Postpartum depression
• Major depressive disorder
• No Depression
image

Experimentation

Three Machine Learning Algorithms (Support Vector Machine, Random Forest, and Naive Bayes) were used in detecting depression on the dataset to get an estimate of which one of them gave better results.

Depression Detection Using Support Vector Machine

image

Depression Detection Using Random Forest

image

Depression Detection Using Naive Bayes

image

Comparison of Machine Learning Classifiers

image

Results Using Deep Learning

Various deep learning models, including CNN, LSTM, and BERT, were employed to assess their performance on the dataset.

Depression Detection Using Convolutional Neural Networks (CNNs)

image

Depression Detection Using LSTM

image

Depression Detection Using BERT

image

Comparison of Deep Learning Classifiers

image

Explainable AI

Explainable Artificial Intelligence, also known as XAI, is used so that the model also tells us on what basis it made a certain decision. In other words, designing AI systems in such a way that they also explain their decision-making process to humans. In sentiment analysis, explainable AI helps to know what features or words in a sentence make a classification decision. This is done by highlighting the text in the sentence. In Python, two libraries, LIME and SHAP, are used for XAI purposes.
In the research context, XAI helps if a machine learning and deep learning model has predicted that a certain tweet contains a certain type of depression. Then, it also explains why it made that decision. It highlights the text in the tweet, saying that the model made this classification decision due to the highlighted word or words.

Results of Explainability

Postpartum Depression

image

Atypical Depression

image

Psychotic Depression

image

Major Depression

image

Bipolar

image

No Depression

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published