Description Usage Arguments Value See Also Examples
Extracts the paths from node to root for each (not terminal) node.
Applies getAncestryTree
to all
trees of a randomForest
-object.
1 | getAncestryForest(rFobject)
|
rFobject |
A |
A list
of length rFobject$ntree
getAncestryTree
, getAncestryNode
1 2 3 4 5 6 7 8 9 10 11 | ## data
YX <- simulateSNPdata(seed = 123)
## forest
rF <- randomForest(x = YX[ , -1], y = YX[ , 1], keep.forest = TRUE,
keep.inbag = TRUE, importance = TRUE, ntree = 500)
## ancestry
aF <- getAncestryForest(rF)
aF[[1]]$"32"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.