Gradient Boosting Machines
Explore how gradient boosting machines work by sequentially training weak learners to predict and correct residual errors from previous models. Understand the role of residuals, learning rate, and loss functions in refining predictions for regression problems. This lesson builds a foundation to apply and validate gradient boosting models effectively using boosted tree algorithms.
We'll cover the following...
A delivery-time model that predicts every order will take 32 minutes ignores a useful pattern. Orders traveling 2 kilometers may arrive in 20 minutes, while orders traveling 12 kilometers may take 44 minutes. The mean prediction gives every row a starting point, but its errors are not random noise. They contain information that a later model can correct.
A residual is the actual outcome minus the current prediction. If an order actually takes 44 minutes and the model predicts 32, its residual is
The code below begins with the mean delivery-time prediction and calculates the residual for each order. It also summarizes the remaining error after that simple baseline.