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

Getting ready

In this example, we use a dataset from the UCI ML repository on credit card defaults. This dataset contains the following information:

  • Default payments
  • Demographic factors
  • Credit data
  • History of payments
  • Bill statements of credit card clients

The data and the data descriptions are provided in the GitHub folder:

We will start by loading the required libraries and reading our dataset:

import osimport numpy as npimport pandas as pdimport matplotlib.pyplot as plt%matplotlib inlineimport seaborn as sns

We set our working folder as follows:

# Set your working directory according to your requirementos.chdir(".../Chapter 6/Random Forest")os.getcwd()

Let's now read our data. We will prefix the DataFrame name with df_ so that we can ...

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