Table of Contents
Preface
Section 1: Bagging and Boosting
Chapter 1: Machine Learning Landscape
Previewing XGBoost4
What is machine learning? 5
Data wrangling5
Dataset 1 – Bike rentals 5
Understanding the data 8
Correcting null values 10
Predicting regression16
Predicting bike rentals 16
Saving data for future use 17
Declaring predictor and target columns 17
Understanding regression 17
Accessing scikit-learn 18
Silencing warnings 18
Modeling linear regression 19
XGBoost 21
XGBRegressor 21
Cross-validation 22
Predicting classification25
What is classification? 25
Dataset 2 – The census 26
Data wrangling 26
Logistic regression 30
The XGBoost classifier 32
Summary33
Chapter 2: Decision Trees in Depth
Introducing decision trees ...
Get Hands-On Gradient Boosting with XGBoost and scikit-learn 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.