tree_height: Determine height of RF decision tree

Description Usage Arguments Examples

View source: R/random_rotation.R

Description

Recursively compute tree height from the randomForest R package tree representation

Usage

1
tree_height(mytree, r = 1, d = 1)

Arguments

mytree

tree representation from randomForest output rf$forest$treemap

r

internal recursion parameter (not used in user call)

d

internal recursion parameter (not used in user call), represents depth

Examples

1
2
rf <- randomForest(Species ~ ., iris)
tree_height(rf$forest$treemap[,,1])

randomrotation/random.rotation documentation built on Dec. 31, 2020, 2:15 a.m.