← All posts
Machine Learning · Boosting · XGBoost

XGBoost — StatQuest Notes

Follow Josh Starmer’s StatQuest XGBoost series in order: regression, classification, the mathematics, and the speedups. A fifth note accompanies the separate Python walkthrough.

Start with the four-row examples. Watch the tree group rows that need similar corrections, calculate each leaf’s correction, and add a small part of it to the existing prediction.

The complete reading order

Before you start

If predicting a residual still feels strange, read why a tree predicts the remaining correction first. These notes then focus on what XGBoost changes: the split score, regularized leaf values, and efficient tree construction.

Lecture calculations use their stated settings, including an initial prediction of 0.5 and, initially, zero leaf regularization. These are teaching choices. The Python note states its own settings and includes a complete runnable script, measured results, and source data links.