sentiment_analysis

Introduction

This project is part of the course Machine Learning with Python: from Linear Models to Deep Learning.

Goals

Design a classifier to use for sentiment analysis of product reviews with a training set that consists of reviews written by Amazon customers for various food products.

The reviews, originally given on a 5 point scale, have been adjusted to a +1 or -1 scale, representing a positive or negative review, respectively.

Steps

  1. Implement and compare three types of linear classifiers: the perceptron algorithm, the average perceptron algorithm, and the Pegasos algorithm.

  2. Use your classifiers on the food review dataset, using some simple text features.

  3. Experiment with additional features and explore their impact on classifier performance.

Files

  • project1.py contains various useful functions and templates to implement learning algorithms

  • main.py is a script skeleton where these functions are called to run the experiments

  • utils.py contains utility functions implemented by MITx staff

  • test.py is a script which runs tests to debug learning algorithms