gRIT: Generalized random intersection trees

Description Usage Arguments Value

View source: R/gRIT.R

Description

Run RIT across decision paths of a fitted random forest.

Usage

1
2
3
4
5
gRIT(x, y, rand.forest = NULL, read.forest = NULL,
  rit.param = list(depth = 5, ntree = 500, nchild = 2, class.id = 1,
  min.nd = 1, class.cut = NULL), varnames.grp = colnames(x),
  weights = rep(1, nrow(x)), signed = TRUE, oob.importance = TRUE,
  ints.idx.eval = NULL, ints.eval = NULL, n.core = 1)

Arguments

x

numeric feature matrix

y

response vector. If factor, classification is assumed.

rand.forest

an object of class randomForest. Required if read.forest is NULL.

read.forest

output of readForest. Required if rand.forest is NULL.

rit.param

named list specifying RIT parameters. Entries include depth: depths of RITs, ntree: number of RITs, nchild: number of child nodes for each RIT, class.id: 0-1 indicating which leaf nodes RIT should be run over, min.nd: minimum node size to run RIT over, class.cut: threshold for converting leaf nodes in regression to binary classes.

varnames.grp

grouping "hyper-features" for RIT search. Features with the same name will be treated as identical for interaction search.

weights

numeric weight for each observation. Leaf nodes will be sampled for RIT with probability proprtional to the total weight of observations they contain.

signed

if TRUE, signed interactions will be returned

oob.importance

if TRUE, importance measures are evaluated on OOB samples.

ints.idx.eval

like ints.eval, but specifies the indice of the interactions instead of their names. Intended for internal use only.

ints.eval

interactions to evaluate. If specified, importance metrics will be evaluated for these interactions instead of those recovered by RIT.

n.core

number of cores to use. If -1, all available cores are used.

Value

a data table containing the recovered interactions and importance scores.


sumbose/iRF documentation built on March 12, 2021, 7:36 a.m.