Assignment - Sentiment Analysis of Movie Reviews

Problem Statement: Apply the bag of words technique to train ML models for sentiment analysis using data from the "Sentiment Analysis on Movie Reviews" Kaggle competition.
Outline:
- Download and Explore Dataset
- Implement the Bag of Words Technique
- Train baseline model & submit to Kaggle
- Train & finetune different ML models
- Document & submit your notebook
Dataset: https://www.kaggle.com/c/sentiment-analysis-on-movie-reviews
Download Dataset from Kaggle
- Read the "Description", "Evaluation" and "Data" sections on the Kaggle competition page carefully
- Make sure to download the
kaggle.jsonfile from your Kaggle account and upload it on Colab
Explore and Visualize Data
- Load the train, test, and submission files using Pandas
- Explore rows, columns, sample values etc.
- Visualize distribution of target columns
Summarize your insights and learnings from the dataset below:
?????????
Implement Bag of Words Model
Outline:
- Learn the vocabulary using
CountVectorizer - Transform training and test data
Learn Vocabulary using CountVectorizer
- Create custom tokenizer with stemming
- Create a list of stop words
- Configure and create
CountVectorizer - Learn vocubulary from training set
- View sample entries from vocabulary
Transform Training & Test Data
- Transform phrases from training set
- Transform phrases from test set
- Look at some example values
Train Baseline Model & Submit to Kaggle
- Split training and validation sets
- Train logistic regression model
- Study predictions on sample phrases
- Make predictions and submit to Kaggle
Split Training and Validation Sets
Tip: Don't use a random sample for validation set (why?)
Make Predictions & Submit to Kaggle
- Make predictions on Test Dataset
- Generate & submit CSV on Kaggle
- Add screenshot of your score
Train & Finetune Different ML Models
Train & finetune at least 2 other types of models
Models to try:
- Decision Trees
- Random Forests
- Gradient Boosting
- Naive Bayes
- SVM
Optional:
- Use PCA for dimensionality reduction
- Compare classification vs regression models
Tips:
- If using a regression model, make sure to round predictions to integer and clip to the range
[1,5] - Track your progress in a copy of this experiment tracking spreadsheet
Best Model:
???
(include Kaggle score screenshot)
Submission and Future Work
How to make a submission:
- Add documentation and explanations
- Clean up any stray code/comments
- Include a screenshot of your best score
- Make a submission on the assignment page
- Review evaluation criteria carefully
Future work:
- Try more machine learning models
- Try configuring CountVectorizer differently
- Try approaches other than bag of words