snpRF (version 0.4)

treesize: Size of trees in an ensemble

Description

Size of trees (number of nodes) in and ensemble.

Usage

treesize(x, terminal=TRUE)

Arguments

x
an object of class snpRF, which contains a forest component.
terminal
count terminal nodes only (TRUE) or all nodes (FALSE

Value

A vector containing number of nodes for the trees in the snpRF object.

See Also

snpRF

Examples

Run this code
data(snpRFexample)
eg.rf <- snpRF(x.autosome=autosome.snps,x.xchrom=xchrom.snps,
               xchrom.names=xchrom.snps.names,x.covar=covariates, 
               y=phenotype)
hist(treesize(eg.rf))

Run the code above in your browser using DataCamp Workspace