Repository navigation
v0.4.4
·
14 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
hessboost v0.4.4
Adds opt-in feature-range clamping (linear_clamp) for linear trees (linear_tree), so out-of-range inputs cannot extrapolate along fitted leaf slopes beyond their training bounds.
Full Changelog: v0.4.3...v0.4.4
Highlights Since v0.4.3
Linear trees
linear_clampoption: Opt-in flag (linear_clampflat parameter, requiringlinear_tree=true;LinearTree::new(lambda)?.with_clamp(true)/.clamp()in Rust) that bounds each linear leaf's output to its model's extremes over the box of its training feature ranges. Off by default.- Per-term range recording and clamping: Each fitted leaf records the
[min, max]of every term's feature across the complete rows that entered its fit, excluding rows where both gradient and Hessian are zero (such as zero-weight rows). At prediction, inputs are clamped into their term's range via comparisons before multiplying by the slope, so in-range values (including signed zeros) pass through bit for bit. - Model and format compatibility: Training rows used in a leaf's fit keep their outputs bit for bit; only out-of-range inputs (new data, sampled-out rows, or zero-gradient/zero-Hessian rows) change. Native binary files mark clamped trees with
tree.has_linear = 2and store bounds in the newREQUIREDleaf_linear.lowerandleaf_linear.uppersections, written only when a tree clamps, leaving unclamped model files byte-identical and making older releases reject clamped files rather than silently extrapolate. Native JSON exposeslinear.ranges([[lower, upper], ...]ornull), and Python exposesLinearLeavesInfo.rangesas a(terms, 2)float32array orNone.
Pull Requests by Category
Features
- feat(tree): clamp linear-leaf inputs to their training ranges (
linear_clamp) (#188)