inTrees (version 1.2)

RF2List: 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

Run this code
# NOT RUN {
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
# }

Run the code above in your browser using DataLab