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)
A trained RF or GBM model
The training set features
The training set outcomes. If NULL, assumed to be last column of x
Integer: Number of trees to extract
Integer: Max depth to consider
Float: See inTree=es::pruneRule
Integer: See inTreees::pruneRule
Logical: If TRUE, print messages to output