From the course: Deep Learning with Python and Keras: Build a Model for Sentiment Analysis

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Analyzing word lengths across sentiment categories

Analyzing word lengths across sentiment categories

- [Instructor] Now that we have the data that we're going to be working with, let's understand this data, get to know it a bit better. Now we have three possible categories of sentiment. Let's see how many records we have for each category. The value_counts function on my data frame column will give me how many records I have for each of the three sentiments. You can see that most of the sentences are neutral, but we have a good number of positive and negative sentences as well. One thing to note here is that the dataset isn't very large. It's only about 5,000-6,000 records. You'll find that there is a limit to how well our model performs given the fewer records we have to work with. Also in the negative category, we only have around 800 records. You'll find that the model that we train will find it hard to identify negative sentiment. We can actually visualize the same information using a nice bar chart representation…

Contents