getAncestryForest: retrieves the path from node to root for all (not terminal)...

Description Usage Arguments Value See Also Examples

Description

Extracts the paths from node to root for each (not terminal) node. Applies getAncestryTree to all trees of a randomForest-object.

Usage

1

Arguments

rFobject

A randomForest object

Value

A list of length rFobject$ntree

See Also

getAncestryTree, getAncestryNode

Examples

 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"

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