Description Usage Arguments Value See Also Examples
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.
1 | getSplitInformationForest(rfObject, X = matrix())
|
rfObject |
A |
X |
A |
A list
of the same length as number of trees in the forest,
each element with 3 components as returned by getSplitInformationTree
.
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]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.