terminalNodesDepth: Depth of each terminal node of all trees in a ranger model

Description Usage Arguments Details Value Examples

View source: R/terminal_nodes.R

Description

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.

Usage

1

Arguments

model

A ranger model

Details

This function may be parallelized using a future backend.

Value

A tibble with three columns: 'id_tree', 'id_node', 'depth'.

Examples

1
2
rf = ranger::ranger(Species ~ ., data = iris, num.trees = 100)
terminalNodesDepth(rf)

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