treesize: Size of trees in an ensemble

Description Usage Arguments Value Note Author(s) See Also Examples

Description

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

Usage

1
treesize(x, terminal=TRUE)

Arguments

x

an object of class randomForest, 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 randomForest object.

Note

The randomForest object must contain the forest component; i.e., created with randomForest(..., keep.forest=TRUE).

Author(s)

Andy Liaw andy\_liaw@merck.com

See Also

randomForest

Examples

1
2
3
data(iris)
iris.rf <- randomForest(Species ~ ., iris)
hist(treesize(iris.rf))

Example output

randomForest 4.6-12
Type rfNews() to see new features/changes/bug fixes.

randomForest documentation built on May 2, 2019, 5:54 p.m.