GithubHelp home page GithubHelp logo

minyall / trump_tweet_classifier Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 1.32 MB

A small project that uses a Neural Network to predict when a tweet was written by Donald Trump, and when it was written by his staff.

License: MIT License

Jupyter Notebook 100.00%

trump_tweet_classifier's Introduction

Building a Trump Tweet Classifier with Keras

A small project written in Python that uses a Neural Network to predict when a tweet was written by Donald Trump, and when it was written by his staff.

A corresponding write-up of the project is available on Medium: Finding Trump with Neural Networks - Medium

Rationale

Prior to March 2018 Donald Trump had been using an unauthorised personal Android phone in his role at POTUS. Whilst a source of anxiety for his staff, for journalists and researchers this was particularly useful for distinguishing the words of the President himself, from those of the White House staff. With Twitter’s API providing information on the ‘source’ for each Tweet, it became a fair assumption that if the ‘source’ was Android, it was pure Trump. However in March 2017 Trump moved to an authorised iPhone, obscuring the origin of tweets specifically from his phone.

This small project explores the possibilities of using Neural Networks to identify Trump and Staff tweets based off the Tweet text content.

The project uses Keras for model building and is a nice simple introduction to building, evaluating, and using Neural Networks for binary classification of text.

Data for the project can be found at this repo.


alt text

Predicted Trump Tweets

alt text

Predicted Staff Tweets

alt text

trump_tweet_classifier's People

Contributors

minyall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rohitn hermionewy

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.