Description Usage Arguments Value
View source: R/tree_traversal_util.R
Function to recursively traverse depths of a tree.
1 | recursiveDepthBinning(node_list, depth, expected_num_children, binned_depths)
|
node_list |
Must be in the format of elements in the Ranger package's forest$split.varIDs, which represents one tree in the forest. Recursion is done by counting the number of terminal nodes at the current depth to anticipate the correct number of nodes at the next depth. |
depth |
Each recursive call must know the current depth in the tree. |
expected_num_children |
The number of nodes in the current depth must be anticipated, given the number of terminal nodes at the previous depth. |
binned_depths |
A list passed between recursive calls, to store results. |
A list of vectors, where elements correspond to depths, and vectors contain variable ID's of variables used to split at that depth.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.