Build a deep learning model for sentiment analysis of IMDB reviews
Switch branches/tags
Clone or download
Latest commit 9c6ad56 Sep 27, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
images improve notebook Jun 5, 2018
models Sentiment Analysis Template v0 May 24, 2018 Update Jun 18, 2018
floyd.yml rename config file Jun 13, 2018
sentiment-movie-review.ipynb Fix freeze Sep 27, 2018 Sentiment Analysis Template v0 May 24, 2018

Sentiment Analysis

Sentiment analysis is one of the most common NLP problems. The goal is to analyze a text and predict whether the underlying sentiment is positive, negative or neutral. What can you use it for? Here are a few ideas - measure sentiment of customer support tickets, survey responses, social media, and movie reviews!

Try it now

Run on FloydHub

Click this button to open a Workspace on FloydHub that will train this model.

Predicting sentiment of movie reviews

In this notebook we will build a Convolutional Neural Network (CNN) classifier to predict the sentiment (positive or negative) of movie reviews.


We will use the Stanford Large Movie Reviews dataset for training our model. The dataset is compiled from a collection of 50,000 reviews from IMDB. It contains an equal number of positive and negative reviews. The authors considered only highly polarized reviews. Negative reviews have scores ≤ 4 (out of 10), while positive reviews have score ≥ 7. Neutral reviews are not included. The dataset is divided evenly into training and test sets.

We will:

  • Preprocess text data for NLP
  • Build and train a 1-D CNN using Keras and Tensorflow
  • Evaluate our model on the test set
  • Run the model on your own movie reviews!