Available on crate feature
alloc only.Expand description
Cache-optimized tree traversal for prediction.
Standalone functions that operate on a TreeArena for traversal, prediction,
and structural queries. These are decoupled from crate::tree::StreamingTree
so they can be reused by the ensemble layer and tested independently.
Functions§
- collect_
leaves - Collect every leaf
NodeIdreachable fromrootvia depth-first traversal. - predict_
batch - Batch prediction: compute the leaf value for each row in
feature_matrix. - predict_
from_ root - Predict the leaf value for a single feature vector, starting from
root. - traverse_
to_ leaf - Traverse the tree from the given root to a leaf, returning the leaf’s
NodeId. - tree_
depth - Compute the maximum depth of any leaf reachable from
root.