Getting ready

Now that we have created and saved CBOW word embeddings, we need to use them to make sentiment predictions on the movie dataset. In this recipe, we will learn how to load and use pre-trained embeddings and use these embeddings to perform sentiment analysis by training a logistic linear model to predict a good or bad review.

Sentiment analysis is a really hard task to perform because the human language makes it very hard to grasp the subtleties and nuances of the true meaning of what is meant. Sarcasm, jokes, and ambiguous references all make this task exponentially harder. We will create a simple logistic regression on the movie review dataset to see if we can get any information out of the CBOW embeddings we created and saved ...

Get TensorFlow Machine Learning Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.