RF2List: Transform a random forest object to a list of trees

View source: R/RF2List.R

RF2ListR Documentation

Transform a random forest object to a list of trees

Description

Transform a random forest object to a list of trees

Usage

RF2List(rf)

Arguments

rf

random forest object

Value

a list of trees

See Also

GBM2List

Examples

library(RRF)
data(iris)
X <- iris[,1:(ncol(iris)-1)]
target <- iris[,"Species"] 
rf <- RRF(X,as.factor(target),ntree=100) # build an ordinary RF 
treeList <- RF2List(rf)
ruleExec <- extractRules(treeList,X) # transform to R-executable rules

inTrees documentation built on May 29, 2024, 2:39 a.m.

Related to RF2List in inTrees...