Description Usage Arguments Value Examples
Converts random forest objects from various libraries into a common
structure, i.e. a “tidy” random forest, calculating absent auxiliary
information on demand, in order to provide a uniform interface for other
tree.interpreter
functions. Note that the output is of a private
format, and is subject to change.
1 | tidyRF(rfobj, trainX, trainY)
|
rfobj |
A random forest object. Currently, supported libraries include
|
trainX |
A data frame. Train set features. |
trainY |
A data frame. Train set responses. |
A list of class tidyRF
, with entries:
num.trees
An integer. Number of trees.
feature.names
A vector. Names of features.
num.classes
An integer. For classification trees, number of classes of the response. For regression trees, this field will always be 1.
class.names
A vector. Names of response classes.
inbag.counts
A list. For each tree, a vector of the number of times the observations are in-bag in the trees.
left.children
A list. For each tree, a vector of the left children of its nodes.
right.children
A list. For each tree, a vector of the right children of its nodes.
split.features
A list. For each tree, a vector of the indices of features used at its nodes. Indices start from 0. A value of 0 means the node is terminal. This does not cause ambiguity, because the root node will never be a child of other nodes.
split.values
A list. For each tree, a vector of the values of features used at its nodes.
node.sizes
A list. For each tree, a vector of the sizes of its nodes.
node.resp
A list. For each tree, a vector of the responses of its nodes.
delta.node.resp.left
A list. For each tree, a vector of the difference between the responses of the left children of its nodes and themselves.
delta.node.resp.right
A list. For each tree, a vector of the difference between the responses of the right children of its nodes and themselves.
1 2 3 4 | |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.