| extract_forest | R Documentation |
Extracts the whole decision forest as a left-first, depth-first walk over all vertices.
extract_forest(x)
x |
A model to convert; has to hold the forest ( |
A data frame with the forest structure.
Each row represents a step in a left-first, depth-first walk over the forest.
The Feature column holds, for branches, the feature used for a split, or NA, for leaves.
Similarly, Threshold and Subset columns hold the splitting criterion for branches; they exists only when holding any data.
For a numerical or integer split, observations with values strictly larger than threshold are sent left.
For a subset split, observations with values in the threshold subsets are sent left.
Logical splits have a fixed criterion, TRUEs are sent left.
This way, they have no corresponding criterion column.
Finally, leaf visits have their vote stored in the Vote colum.
This function will solidify the model object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.