View source: R/distillTreeRules.R
distillTreeRules | R Documentation |
Extract rules from RF or GBM model, prune, and remove unnecessary rules using inTrees
distillTreeRules(
mod,
x,
y = NULL,
n.trees = NULL,
maxdepth = 100,
maxDecay = 0.05,
typeDecay = 2,
verbose = TRUE
)
mod |
A trained RF or GBM model |
x |
The training set features |
y |
The training set outcomes. If NULL, assumed to be last column of |
n.trees |
Integer: Number of trees to extract |
maxdepth |
Integer: Max depth to consider |
maxDecay |
Float: See |
typeDecay |
Integer: See |
verbose |
Logical: If TRUE, print messages to output |
Models must be trained with s_RF or s_GBM
E.D. Gennatas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.