How to do it...

Let's now move on to look at how to build our model.

  1. After reading the data, we use the head() function to take a look it:
 df_messages.head(3)

In the following screenshot, we can see that there are two columns: labels and messageThe output is as follows:

  1. We then use the describe() function to look at a few metrics in each of the columns:
df_messages.describe()

This gives us the following metrics:

For the object datatype, the result of describe() will provide metrics, count, unique, top, and freq. top refers to the most ...

Get Ensemble Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.