Skip to Main Content
Ensemble Machine Learning Cookbook
book

Ensemble Machine Learning Cookbook

by Dipayan Sarkar, Vijayalakshmi Natarajan
January 2019
Beginner to intermediate content levelBeginner to intermediate
336 pages
7h 58m
English
Packt Publishing
Content preview from Ensemble Machine Learning Cookbook

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():
df_backorder.shapedf_backorder.head()df_backorder.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:
df_backorder.dtypes
  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', ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Productive and Efficient Data Science with Python: With Modularizing, Memory profiles, and Parallel/GPU Processing

Productive and Efficient Data Science with Python: With Modularizing, Memory profiles, and Parallel/GPU Processing

Tirthajyoti Sarkar
Hands-On Automated Machine Learning

Hands-On Automated Machine Learning

Sibanjan Das, Umit Mert Cakmak

Publisher Resources

ISBN: 9781789136609Supplemental Content