Objective

Build a Sentiment Classifier


In [2]:
from __future__ import print_function  # Python 2/3 compatibility
import numpy as np
import pandas as pd

from IPython.display import Image

Load Data

  • Load Training Data
  • Split into Train and Validation

In [6]:
## Your Turn

Vectorize

  • Vectorize using Scikit-Learn

Hints: Checkout CountVectorizer, TFIDFVectorizer and others in sklearn.feature_extraction.text


In [7]:
## Your Turn

Model

  • Build Models
  • Evaluate them on Validation data

In [5]:
## Choosing an Estimator
# http://scikit-learn.org/stable/tutorial/machine_learning_map/index.html
    
Image("http://scikit-learn.org/stable/_static/ml_map.png")


Out[5]:

In [8]:
## Your Turn

Model Tuning

  • Tune the Model if it's overfitting

In [10]:
## Your Turn

Feeling Good? - Let's Update Kaggle Submission

Steps:

  • Load Test Dataset
  • Vectorize the Features (Review)
  • Predict the sentiment
  • Create the CSV file and update the submission

In [11]:
## Your Turn

Congratulations