Learn R Programming

randomForest (version 4.7-1.2)

treesize: Size of trees in an ensemble

Description

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

Usage

treesize(x, terminal=TRUE)

Value

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

Arguments

x

an object of class randomForest, which contains a forest component.

terminal

count terminal nodes only (TRUE) or all nodes (FALSE

Author

Andy Liaw andy_liaw@merck.com

See Also

randomForest

Examples

Run this code
data(iris)
iris.rf <- randomForest(Species ~ ., iris)
hist(treesize(iris.rf))

Run the code above in your browser using DataLab