Code Monkey home page Code Monkey logo

mudasirahmadwani / depression-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aaronstone1699/depression-detection

1.0 0.0 0.0 7.07 MB

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

License: GNU Affero General Public License v3.0

Python 100.00%

depression-detection's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.