simple_tree: User-friendly constructor for simple_tree

View source: R/classes.R

simple_treeR Documentation

User-friendly constructor for simple_tree

Description

User-friendly constructor for simple_tree

Usage

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

A validated simple_tree object


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