Git Product home page Git Product logo

nlp-with-disaster-tweets's Introduction

Kaggle-nlp with disaster tweets

This is a tutorial in an IPython Notebook for the Kaggle competition, Natural Language Processing with Disaster Tweets. The goal of this repository is to provide an example of a competitive analysis for those interested in getting into the field of data analytics or using python for Kaggle's Data Science competitions.

Quick Start: View a static version of the notebook in the comfort of your own web browser.

Installation:

To run this notebook interactively:

  1. Download this repository in a zip file by clicking on this link or execute this from the terminal: git clone https://github.com/Mieczmik/nlp-with-disaster-tweets.git
  2. Install virtualenv.
  3. Navigate to the directory where you unzipped or cloned the repo and create a virtual environment with virtualenv env.
  4. Activate the environment with source env/bin/activate
  5. Install the required dependencies with pip install -r requirements.txt.
  6. Execute ipython notebook from the command line or terminal.
  7. Click on nlp-with-disaster-tweets.ipynb on the IPython Notebook dasboard and enjoy!
  8. When you're done deactivate the virtual environment with deactivate.

Kaggle Competition | Titanic Machine Learning from Disaster

"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). In this competition, you’re challenged to build a machine learning model that predicts which Tweets are about real disasters and which one’s aren’t. You’ll have access to a dataset of 10,000 tweets that were hand classified." From the competition homepage.

Goal for this Notebook:

Show a simple example of an analysis of the Titanic disaster in Python using a full complement of PyData utilities. This is aimed for those looking to get into the field or those who are already in the field and looking to see an example of an analysis done with Python.

This Notebook will show basic examples of:

Data Preprocessing

  • Importing Data with Pandas
  • Data Review
  • Work with text data:
    • Tokenize tweets with TweetTokenizer
    • Remove numbers, punctuation and hashtags
    • Stemming words with PorterStemmer
    • Create pipelines with Tfidf or Count Vectorizers

Data Analysis

Training listed below machine learning models using GridSearchCV and Pipelines:

  • Naive Bayes Classifier
  • Linear Support Vector Classifier
  • Support Vector Classifier
  • Logistic Regression
  • k-Nearest Neighbors
  • Decission Tree Classifier
  • Random Forest
  • Bagging Classifier
  • Extra Trees Classifier
  • Adaptive Boosting (AdaBoost)
  • Gradient Boosting
  • Extreme Gradient Boosting (xgboost)

Summary

  • Plotting results
  • Export results

nlp-with-disaster-tweets's People

Contributors

mieczmik avatar

Watchers

 avatar

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.