Skip to main content

predict_from_root

Function predict_from_root 

Source
pub fn predict_from_root(
    arena: &TreeArena,
    root: NodeId,
    features: &[f64],
) -> f64
Available on crate feature alloc only.
Expand description

Predict the leaf value for a single feature vector, starting from root.

Equivalent to arena.leaf_value[traverse_to_leaf(arena, root, features).idx()].