Sentiment Analysis Using Neural Networks with Python I'm working on a task for an assignment for school. The course doesn't have a textbook and instead uses the tutorial on DataCamp. I've struggled severely using DataCamp to learn (been through it multiple times) and instead have found that written tutorials help me learn much better and quicker (at least with machine learning models). I usually use Medium but haven't found anything useful on there, so far.
I was curious if there's a tutorial that might help me with the following task.
You will build a neural network designed to learn word usage and context using NLP techniques. You will provide visualizations and a report, as well as build your network in an interactive development environment.
Here's how to create such a network. Convert your text into numbers using some tokenizer (Tensorflow's Keras has one). Break it off into equal blocks of some size x. Feed these blocks into an Embedding layer followed by LSTM or GRU (or their bi-directional variants) and finally have a three way classification (positive, neutral or negative) or for regression just a single sigmoid.
One trick though if you have class imbalance, train with full data in the beginning (some initial epochs). Then, for the further iterations, drop the neutral data, just train on positive and negative examples (since, you mostly have a lot of neutral data in these cases).