Description Usage Arguments Value
View source: R/tree_traversal_util.R
Given a forest object from the ranger package, this function will bin the forest into depths. This is a helper function for the 'calculateAMDMS' function.
1 | binForestByDepth(ranger_obj)
|
ranger_obj |
A ranger object from the ranger package, which was created with param write.forest set to TRUE. In other words, it must have a 'forest' property. |
A list with 3 elements. The first is a list of vectors - one for each independent variable ocurring in the forest (this may not be the complete set of independent variables, but we will account for any variables that do not occur in the forest later). Each vector contains all minimal depths of maximal subtrees in the forest, for the corresponding independent variable. The second element is a vector of tree heights 'forest_depths'. The third element is a set of variable id's for matching to independent variable names.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.