Learn R Programming

randomUniformForest (version 1.1.6)

getTree.randomUniformForest: Extract a tree from a forest

Description

get the structure of a tree from a randomUniformForest object.

Usage

getTree.randomUniformForest(object, whichTree, labelVar = TRUE)

Arguments

object

an object of class randomUniformForest.

whichTree

which tree have to be printed ?

labelVar

if TRUE, names of the variables will be printed, rather than their positions.

Value

a data frame representing the raw tree structure

Examples

Run this code
# NOT RUN {
data(iris)
iris.ruf <- randomUniformForest(Species ~ ., data = iris, 
threads = 1, ntree = 20, BreimanBounds = FALSE) 

# get the 10th tree
OneTree <- getTree.randomUniformForest(iris.ruf, 10)
# }

Run the code above in your browser using DataLab