View source: R/addSurrogates.R
addSurrogates | R Documentation |
This function adds surrogate variables and adjusted agreement values to a forest that was created by getTreeranger.
addSurrogates(RF, trees, s, Xdata, num.threads)
RF |
random forest object created by ranger (with keep.inbag=TRUE). |
trees |
list of trees created by getTreeranger. |
s |
Predefined number of surrogate splits (it may happen that the actual number of surrogate splits differes in individual nodes). Default is 1 % of no. of variables. |
Xdata |
data without the dependent variable. |
num.threads |
number of threads used for parallel execution. Default is number of CPUs available. |
a list with trees containing of lists of nodes with the elements:
nodeID: ID of the respective node (important for left and right daughters in the next columns)
leftdaughter: ID of the left daughter of this node
rightdaughter: ID of the right daughter of this node
splitvariable: ID of the split variable
splitpoint: splitpoint of the split variable
status: "0" for terminal and "1" for non-terminal
layer: layer information (0 means root node, 1 means 1 layer below root, etc)
surrogate_i: numbered surrogate variables (number depending on s)
adj_i: adjusted agreement of variable i
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.