getMAFofSplitVariablesForest: returns the minor allel frequency of the split variables

Description Usage Arguments Value See Also Examples

Description

For each not terminal node in the forest this functions returns the minor allel frequency (MAF) of the variable used for splitting in the according node.

Usage

1
getMAFofSplitVariablesForest(splitVariablesForest = list(), ...)

Arguments

splitVariablesForest

A list containing the indices of the variables used for splitting in the forest as returned by getSplitVariablesForest.

...

Further arguments passed to getMAFofSplitVariablesTree.

Value

A list of same length as number of trees in the forest. Each element contains a vector of same length as number of not terminal nodes in the according tree. Returns the MAF of the variables used for splitting in the according node. Values range from 1 to length(mafIntervals) (See. getMAFofSplitVariablesTree), where 1 indicates the first element of mafIntervals.

See Also

getMAFofSplitVariablesTree, getSplitVariablesForest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## data
YX <- simulateSNPdata(seed = 123)

## forest
rF <- randomForest(x = YX[ , -1], y = YX[ , 1], keep.forest = TRUE, 
		keep.inbag = TRUE, importance = TRUE, ntree = 500)

## MAF of split variables
splitVarsF <- getSplitVariablesForest(rF)
mafF <- getMAFofSplitVariablesForest(splitVarsF) 

length(mafF) == rF$ntree
mafF[[1]] # MAFs for first tree

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