distillTreeRules: Distill rules from trained RF and GBM learners

View source: R/distillTreeRules.R

distillTreeRulesR Documentation

Distill rules from trained RF and GBM learners

Description

Extract rules from RF or GBM model, prune, and remove unnecessary rules using inTrees

Usage

distillTreeRules(
  mod,
  x,
  y = NULL,
  n.trees = NULL,
  maxdepth = 100,
  maxDecay = 0.05,
  typeDecay = 2,
  verbose = TRUE
)

Arguments

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 x

n.trees

Integer: Number of trees to extract

maxdepth

Integer: Max depth to consider

maxDecay

Float: See inTree=es::pruneRule

typeDecay

Integer: See inTreees::pruneRule

verbose

Logical: If TRUE, print messages to output

Details

Models must be trained with s_RF or s_GBM

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on May 4, 2024, 7:40 p.m.