How to do it...

Let's now move on to building our model:

  1. First, we want to look at the dimensions of the dataset and the data using the shape and head() functions. We also take a look at the statistics of the numeric variables using describe():
If you get your output in scientific notation, you can change to view it in standard form instead by executing the following command: pd.options.display.float_format = ‘{:.2f}’.format
  1. With dtypes, we get to see the data types of each of the variables:
  1. We can see that sku is an identifier and will be of no use to us for our model-building exercise. We will, therefore, drop sku from our DataFrame as follows:
df_backorder.drop('sku', ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.