Session Ready
Exercise

Sentiment analysis for movie reviews

In this exercise you'll explore the probabilities outputted by logistic regression on a subset of the Large Movie Review Dataset.

The variables X and y are already loaded into the environment. X contains features based on the number of times words appear in the movie reviews, and y contains labels for whether the review sentiment is positive (+1) or negative (-1).

Instructions
100 XP
  • Train a logistic regression model on the movie review data.
  • Predict the probabilities of negative vs. positive for the two given reviews.
  • Feel free to write your own reviews and get probabilities for those too!