/tweet-classification

Build a machine learning classifier that knows whether President Trump or Prime Minister Trudeau is tweeting!

Primary LanguageJupyter Notebook

PROJECT DESCRIPTION

Let's apply our natural language processing knowledge to Twitter. Tweets are notoriously difficult, as they are shorter than most texts and usually have hard-to-parse content like hashtags, mentions, links and emoji.

Despite the difficulties, tweets are fun content, so in this notebook we'll take a look at classifying two prominent North American politicians. Can we determine if it is Donald Trump or Justin Trudeau based on just a tweet? Let's see!

PROJECT TASK

  1. Tweet classification: Trump vs. Trudeau
  2. Transforming our collected data
  3. Vectorize the tweets
  4. Training a multinomial naive Bayes model
  5. Evaluating our model using a confusion matrix
  6. Trying out another classifier: Linear SVC
  7. Introspecting our top model
  8. Writing a Trump or Trudeau tweet