Skip to content

v0.4.4

Choose a tag to compare

@github-actions github-actions released this 28 Oct 23:31
· 14 commits to main since this release
Immutable release. Only release title and notes can be modified.
2c8d329

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_clamp option: Opt-in flag (linear_clamp flat parameter, requiring linear_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 = 2 and store bounds in the new REQUIRED leaf_linear.lower and leaf_linear.upper sections, 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 exposes linear.ranges ([[lower, upper], ...] or null), and Python exposes LinearLeavesInfo.ranges as a (terms, 2) float32 array or None.

Pull Requests by Category

Features

  • feat(tree): clamp linear-leaf inputs to their training ranges (linear_clamp) (#188)

Misc