Description Usage Arguments Value See Also Examples
For a given tree this function returns the layer for each not terminal node.
1 | getLayerTree(ancestryTreeObj = list())
|
ancestryTreeObj |
A |
A vector
with each element indicating the layer of the according
(not terminal) node.
getLayerForest
, getAncestryTree
1 2 3 4 5 6 7 8 9 10 11 12 | ## 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
aT1 <- getAncestryTree(getTree(rF, 1))
## layer
getLayerTree(aT1) ## layers of the not terminal nodes of tree 1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.