NLP and LLMs - Lab - Build a Sentiment Analyis Classifier
About
In this lab, you will use CountVectorizer and TF-IDF in a classification model to predict customer star ratings based on their reviews of a product. (This will serve as proxy for sentiment analysis.)
- Process review text using both CountVectorizer and TF-IDF
- Build a logistic regression model to predict sentiment
- Compare the performance of both approaches
Scenario
You are an analyst for a marketing company that has just launched a new product suite of mobile devices. You have data from product reviews of one of these new products, the TechWave X1. For this lab you will use the text and star ratings from the reviews to predict customer sentiment.
Dataset
- The Reviews data set (
reviews.csvin./data/reviews.csv) is a small sample of reviews created for this Lab
Materials We Provide
| Topic | Description | Link |
|---|---|---|
| Activity | Building and Optimizing a Feedforward Neural Network with PyTorch | Link |
Prerequisites
Before this activity, you should already be able to:
- Understand and implement classification modeling algorithms
- Understand and interpret regression and classification metrics
- Apply CountVectorizer and TF-IDF to text to preprocess data
Important note
Please ignore the _layouts folder and the config.yml file in the root of this repo. They are needed to make sure the repo renders well; please don’t change them or delete them and your repo will work fine :)