Algorithm

fastgbm implements second-order (Newton) gradient boosting with histogram-based split search.

Objectives

For observation \(i\) at iteration \(m\), gradients \(g_i = \partial \ell(y_i, F_i)/\partial F_i\) and Hessians \(h_i = \partial^2 \ell(y_i, F_i)/\partial F_i^2\) are computed for the current objective:

Parallelism

The per-feature histogram/gain scan within each node is data-parallel (each feature’s best split is independent of the others given the node’s gradient/Hessian sums), so it is dispatched through RcppParallel::parallelFor() once the node/feature count crosses an internal threshold (below it, the same code path runs serially – dispatch overhead isn’t worth it for small nodes). Because the reduction across features is a fixed-order argmax rather than an order-dependent floating-point sum, training is bit-identical regardless of threads.

What’s not yet implemented

Leaf-wise (grow_policy = "lossguide") growth, validation-based early stopping (accepted but inactive), monotonic/interaction constraints, and AFT distributions other than the normal.