terminalNodesDepthPerTree: Depth of each terminal node of a single tree in a ranger...

Description Usage Arguments Value Examples

View source: R/terminal_nodes.R

Description

Depth of each terminal node of a single tree in a ranger model. Note that root node has the id_node = 0.

Usage

1

Arguments

treelike

Output of 'ranger::treeInfo'

Value

data.table with two columns: id_node and depth

Examples

1
2
3
4
5
## Not run: 
  rf = ranger::ranger(Species ~ ., data = iris)
  terminalNodesDepthPerTree(ranger::treeInfo(rf, 1))

## End(Not run)

solitude documentation built on July 30, 2021, 1:07 a.m.