HistGradientBoostingClassifier trains gradient-boosted decision-tree ensembles faster by replacing exact split searches with histogram-based feature binning. It is especially useful when data sets are large enough for this speed–exactness tradeoff to matter. section 5.2 section 5.2.4
Its training process follows this practical sequence:
- Build weak decision-tree learners sequentially, using gradient boosting to approximate the training objective’s gradient at each iteration. section 5.2
- Compress continuous feature values into bins, then evaluate splits between neighboring bins rather than between every pair of successive data points. section 5.2.4
- Control model complexity and training length with parameters such as max_depth, max_iter, and learning_rate; deeper trees can overfit. section 5.2.3
Breast-cancer classification
Using scikit-learn, fit HistGradientBoostingClassifier(max_depth=2, max_iter=20, learning_rate=0.75) on training data, predict the test set, and calculate the error. A reported test error on the breast-cancer data set is 4.2%. section 5.2.4
Figure 5.17 Left: A simple 1D regression problem with 50 data points. Center: Standard tree learning evaluates every possible split, which is illustrated by a line between each pair of data points. The best split is the one with the lowest split criterion (here, squared loss). Right: Histogram-based binning first puts the data into five buckets, and then evaluates the splits between each pair of data buckets. Again, the best split is the one with the lowest split criterion (also squared loss).
Compare exact tree splitting with five-bin histogram splitting to see why fewer candidate thresholds improve scalability. section 5.2.4
