getRFsizes: Get sizes of the trees in RF

View source: R/Rinterface.R

getRFsizesR Documentation

Get sizes of the trees in RF

Description

Get numerical characteristics of the trees in a RF model related to the size and depth.

Usage

getRFsizes(model, type=c("size", "sumdepth")) 

Arguments

model

The model structure as returned by CoreModel.

type

The required characteristics.

Details

Size is the number of leaves. The sum of depths means the sum of the depth of all leaves.

Value

Numerical vector of the length equal to the number of trees in RF.

Author(s)

Petr Savicky

See Also

CoreModel, CORElearn.

Examples

# uses iris data set

# build random forests model with certain parameters, 
# do not make too many and too large trees
modelRF <- CoreModel(Species ~ ., iris, model="rf", 
              selectionEstimator="MDL", minNodeWeightRF=50, 
              rfNoTrees=50, maxThreads=1)

getRFsizes(modelRF) 

destroyModels(modelRF) # clean up

CORElearn documentation built on Nov. 18, 2022, 5:08 p.m.