R/terminal_nodes.R
terminalNodesDepth.Rd
Depth of each terminal node of all trees in a ranger model is returned as a three column tibble with column names: 'id_tree', 'id_node', 'depth'. Note that root node has the node_id = 0.
terminalNodesDepth(model)
model | A ranger model |
---|
A tibble with three columns: 'id_tree', 'id_node', 'depth'.
This function may be parallelized using a future backend.
#> id_tree id_node depth #> 1: 1 1 1 #> 2: 1 6 3 #> 3: 1 7 3 #> 4: 1 9 4 #> 5: 1 10 4 #> --- #> 881: 100 11 5 #> 882: 100 13 5 #> 883: 100 14 5 #> 884: 100 15 6 #> 885: 100 16 6