Giter VIP home page Giter VIP logo

raklugrin01 / disaster-tweets-analysis-and-classification Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 1.0 53.69 MB

Analysing Disaster related tweets dataset and build a classifier using deep learning and deploy it using Heroku

Home Page: https://disastertweetsdl.herokuapp.com/

License: MIT License

Jupyter Notebook 99.64% Python 0.11% CSS 0.07% HTML 0.18% Procfile 0.01%
machine-learning deep-learning keras python data-science nlp flask-application exploratory-data-visualizations

disaster-tweets-analysis-and-classification's Introduction

Disaster Tweets Analysis and Classification

Dataset Language Library ML Library DL Library

Project Description

Twitter has become an important communication channel in times of emergency.
The ubiquitousness of smartphones enables people to announce an emergency they’re observing in real-time.
Because of this, more agencies are interested in programatically monitoring Twitter (i.e. disaster relief organizations and news agencies).

Project Contents

  1. Exploratory Data Analysis
  2. EDA after Data Cleaning
  3. Data Preprocessing using NLP
  4. Machine Learning models for classifying Tweets data
  5. Deep Learning approach for classifying Tweets data
  6. Model Deployment

Resources Used

1. Exploratory Data Analysis

  • Visualising Target Variable of the Dataset

    Target Variable
  • Visualising Length of Tweets

    Tweet Length
  • Visualising Average word lengths of Tweets

    Avg Word Lengths
  • Visualising most common stop words in the text data

    Stopwords
  • Visualising most common punctuations in the text data

    Punctuations

2. EDA after Data Cleaning

  • We use Python Regex library and nltk lemmatizing methods for Data Cleaning

  • Visualising words inside Real Disaster Tweets

    Real WC
  • Visualising words inside Fake Disaster Tweets

    Fake WC
  • Visualising top 10 N-grams where N is 1,2,3

    Top N-grams

3. Data Preprocessing using NLP

  • Data Preprocessing for ML models is done using two approaches

    • Bag of Words using CountVectorizer
    • Term Frequency and Inverse Document Frequency using TfidfVectorizer
  • Data Preprocessing for DL models using Tokenization

4. Machine Learning models for classifying Tweets data

  • Machine Learning Models using different n-grams and both Bow and Tf-Idf and visualisation comparing there accuracy

    Ml List
  • The Best ML model trained as we can see above is Voting Classifer, whose report and confusion matrix is shown below

    Voting Classifier

5. Deep Learning approach for classifying Tweets data

  • Using Glove Word Embeddings of embedding dimension = 100 to get embedding matrix for our DL models
  • For every DL model we create a function and use Keras-Tuner to tune the model
  • Finally we choose Bidirectional LSTM for the Deployment

6. Model Deployment

Deployment Demo

Scope of Improvemment

  • We can always use large dataset which covers almost every type of data for both machine learning and deep learning
  • We can use the best pretrained models but they require a lot of computational power
  • Also there are various ways to increase model accuracy like k-fold cross validation, different data preprocessing techniques better than used here

Conclusion

The Data analysis and modelling was sucessfully done, and the Deep Learning model was deployed on Heroku

Please do ⭐ the repository, if it helped you in anyway.

disaster-tweets-analysis-and-classification's People

Contributors

raklugrin01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alswjds

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.