new_simple_tree: Constructor for simple_tree class

View source: R/classes.R

new_simple_treeR Documentation

Constructor for simple_tree class

Description

Creates a simple_tree object with validation

Usage

new_simple_tree(
  children_left,
  children_right,
  feature,
  threshold,
  max_depth,
  n_node_samples,
  value,
  node_count,
  default_left = NULL,
  xgboost_split = FALSE
)

Arguments

children_left

Integer vector of left child indices (-1 for leaf nodes)

children_right

Integer vector of right child indices (-1 for leaf nodes)

feature

Integer vector of feature indices used for splitting (-1 for leaf nodes)

threshold

Numeric vector of threshold values for splits

max_depth

Integer maximum depth of the tree

n_node_samples

Numeric vector of node covers or weights, such as sample counts or summed Hessians

value

Numeric vector of node values

node_count

Integer total number of nodes in the tree

default_left

Logical vector indicating the missing-value direction.

xgboost_split

Logical; use XGBoost float32 strict-less routing.

Value

An object of class simple_tree


qshap documentation built on Aug. 23, 2026, 5:11 p.m.