getSplitInformationForest: returns split information on forest

Description Usage Arguments Value See Also Examples

Description

Given a randomForest-object this function returns split information for all trees in the according forest. Basically applies getSplitInformationTree to all trees in the forest.

Usage

1

Arguments

rfObject

A randomForest-object as returned by randomForest.

X

A matrix containing the (SNP-) variables used in the call to randomForest.

Value

A list of the same length as number of trees in the forest, each element with 3 components as returned by getSplitInformationTree.

See Also

getSplitInformationTree

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## data
YX <- simulateSNPdata(seed = 123)
X <- matrix(as.numeric(as.matrix(YX[, -1])), ncol = ncol(YX[, -1]))

## forest
rF <- randomForest(x = YX[ , -1], y = YX[ , 1], keep.forest = TRUE, 
		keep.inbag = TRUE, importance = TRUE, ntree = 500)
		
## split info
splitInfoF <- getSplitInformationForest(rF, X)
length(splitInfoF) 
names(splitInfoF[[1]])

adibender/rFtools documentation built on May 14, 2019, 5:13 a.m.