preorderlgb: Preorder Traversal of LightGBM Tree

View source: R/lightgbm_ops.R

preorderlgbR Documentation

Preorder Traversal of LightGBM Tree

Description

Called by lgbtree2rules and operates on tree environment in place.

Usage

preorderlgb(
  tree,
  node,
  rule = "TRUE",
  left = "left_child",
  right = "right_child",
  split_feature = "split_feature",
  threshold = "threshold",
  right_cat_type = "in",
  xnames,
  factor_levels,
  trace = 0
)

Arguments

tree

Environment that will hold the extracted rules

node

LightGBM tree

rule

Character: current rule

left

Character: left child label

right

Character: right child label

split_feature

Character: split feature label

threshold

Character: threshold label

right_cat_type

Character: "in" or "notin": operator for right categorical


egenn/rtemis documentation built on Dec. 17, 2024, 6:16 p.m.