/Depression-detector

A system that detects depression from Arabic tweets collected on behalf of the user. Using machine learning and NLP techniques. The output is the percentage of how likely the user is depressed.

Primary LanguageJavaScript

Depression-detector

Abstract

The past decade has witnessed rapid development in microblogging applications and the huge amount of information generated by them. This has led to a considerable amount of research focused on sentiment analysis applications. However, much of the research up to now do not concern with mental illness detection since it can be a complex task. The main aim of this study was to explore different approaches of machine learning to detect depression through Arabic tweets. Part of the aim of this research was to develop a website for depression detection. We have experimented with two approaches in this study: traditional machine learning and deep learning. There are six classifiers used in this study. We have built our dataset of 1058 tweets using Twitter API. The dataset was classified into depressed and not depressed tweets with the help of psychologists. We have experimented three well-known machine learning classifiers, namely support vector machine (SVM) and the variations of Naïve Bayes (NB), i.e. Bernoulli Naïve Bayes (BNB) and complement Naïve Bayes (CNB). For the feature extraction, we have used count vector, term frequencyinverse document frequency (TF-IDF), and N-gram (i.e. bigram, trigram). For the deep learning approach, we have experimented with two main classifiers, namely convolutional neural network (CNN) and recurrent neural network (RNN). The RNN algorithms are long short-term memory (LSTM) and bidirectional long short-term memory (BiLSTM). We have experimented with an ensemble model, combining the CNN and LSTM models. Since the neural networks cannot deal with tweets directly, we used one of the word embedding techniques called Word2vec for the vector representation. The results showed that BNB is the best out of the seven classifiers that we have experimented with, with an accuracy of 89.15%. Thus, BNB has been integrated into our depression detection website.

Functional requirements

Functional requirements provide a general idea about what the system should be able to do. The following describes the system's behavior from input to get the result:

  1. The user writes the Twitter account username.
  2. The user asks the system to detect whether he is depressed or not.
  3. The system fetches all tweets for the given username.
  4. The tweets will be analyzed based on our chosen model.
  5. The system displays the result (the depression percentage).