This is the 2D companion to the 3D gradient-boosting simulator: the exact same boosting math — real greedy, SSE-minimizing regression trees fit to residuals — rendered as two grid-native views instead of a rotating 3D scatter/curve scene.
F_0(x) = mean(y)
r_i = y_i − F_{m-1}(x_i) (residual = negative gradient of ½·SSE)
h_m(x) = regression tree fit to (x_i, r_i), minimizing Σ(r_i − ŷ_leaf)²
F_m(x) = F_{m-1}(x) + ν · h_m(x) (ν = shrinkage / learning rate)
Top panel — residual heatmap. Every column is one data point (sorted left-to-right by x); every row is one completed boosting round, appended at the bottom as training proceeds and scrolling upward once the strip fills. Cell colour is the signed residual y_i − F_m(x_i) at that round, on a fixed red↔blue scale set by the dataset's initial residual spread — so the whole grid visibly cools toward white as rounds correct the fit, and any column that stays dark red or blue is a point the ensemble is still failing to explain.
Bottom panel — live tree partition. Coloured bands show the x-regions ("leaves") the most recent tree split the data into, shaded by that leaf's fitted residual value; the bars overlaid on top are the actual per-point residuals remaining after adding that tree, aligned to the same x-order as the heatmap columns above.
- Shrinkage ν — how much of each new tree's correction is applied per round. Small ν needs more rounds but generalizes better; ν = 1 fits fastest but overfits noise sooner.
- Tree depth — how many splits each new weak learner may use; depth 1 ("stumps") is the classic boosting weak learner, deeper trees fit faster but risk overfitting individual points.
- Dataset noise — how much random scatter is added to the true curve before fitting; watch the heatmap stop cooling and start flickering once rounds outrun the model's capacity to generalize.