aaronstone1699 / Depression-detection

Depression is one of the most common mental disorders with millions of people suffering from it.It has been found to have an impact on the texts written by the affected masses.In this study our main aim was to utilise tweets to predict the possibility of a user at-risk of depression through the use of Natural Language Processing(NLP) tools and deep learning algorithms.LSTM has been used as a baseline model that resulted in an accuracy of 95.12% and an F1 score of 0.9436. We implemented a hybrid Bi-LSTM + CNN model which we trained on learned embeddings from the tweet dataset was able to improve upon previous works and produce precision and recall of 0.9943 and 0.9988 respectively,giving an F1 score of 0.9971.

Home Page:https://parkaidrm.wordpress.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Depression-detection

required libraries

pandas, os, pickle, io, demoji, nltk, re, string, random, numpy, tensorflow, fasttextasft, keras, matplotlib, sklearn, demoji

all of these libraries can be installed through pip

instructions for data_loading_and_preprocessing

this is a stand alone module which requires the user to enter a dataset location with 2 folder ,preferably labeled positive and negative,with positive folder containing positively identified depressive tweets and the negative folder containing normal tweets

a sample dataset is provided in the data folder ,labeled , dataset_tweets_rm.zip to use the dataset,extract the above mentioned file and enter the location of the file at the prompt

this module creates a pickle file which contains a dictionary of all the preprocessed tweets along with their labels and vectors

instructions for model_training

this is a stand alone module which requires the user to enter a pickle file containing the preprocessed tweets from the data_loading_and_preprocessing module,the pickle file should contain a dictionary with atleast 5368 elements and 4 columns ,namely,data,class,tweet,vector

a sample file is provided in the data folder ,labeled , users(1).pickle

this module trains and provides the metrics for the their accuracies

About

Depression is one of the most common mental disorders with millions of people suffering from it.It has been found to have an impact on the texts written by the affected masses.In this study our main aim was to utilise tweets to predict the possibility of a user at-risk of depression through the use of Natural Language Processing(NLP) tools and deep learning algorithms.LSTM has been used as a baseline model that resulted in an accuracy of 95.12% and an F1 score of 0.9436. We implemented a hybrid Bi-LSTM + CNN model which we trained on learned embeddings from the tweet dataset was able to improve upon previous works and produce precision and recall of 0.9943 and 0.9988 respectively,giving an F1 score of 0.9971.

https://parkaidrm.wordpress.com

License:GNU Affero General Public License v3.0


Languages

Language:Python 100.0%