Learn R Programming

forestControl (version 0.2.2)

extract_params: Extract forest parameters

Description

For a randomForest or ranger classification object, extract the parameters needed to calculate an approximate selection frequency threshold

Usage

extract_params(x)

Arguments

x

a randomForest, ranger or parsnip object

Value

a list of four elements

  • Fn The number of features considered at each internal node (mtry)

  • Ft The total number of features in the data set

  • K The average number of binary tests/internal nodes across the enitre forest

  • Tr The total number of trees in the forest

Examples

Run this code
# NOT RUN {
library(randomForest)
data(iris)
iris.rf <- randomForest(iris[,-5], iris[,5], forest = TRUE)

iris.params <- extract_params(iris.rf)
print(iris.params)
# }

Run the code above in your browser using DataLab