PrintTree: RerF Tree Printer

Description Usage Arguments Value Examples

View source: R/PrintTree.R

Description

Prints the layout of a specified tree.

Usage

1
PrintTree(forest, numTree = 1, pretty = FALSE)

Arguments

forest

a rerf forest structure.

numTree

the tree number to print. (numTree=1)

pretty

boolean if TRUE the column of cut features are formatted nicely for viewing. (FALSE)

Value

a data.frame with the following information about the tree:

Examples

1
2
3
4
5
6
7
### Train RerF on numeric data ###
library(rerf)
numTree <- 1
forest <- RerF(as.matrix(iris[, 1:4]), iris[, 5], num.core = 1L)
forest.rmc <- RerF(as.matrix(iris[, 1:4]), iris[, 5], num.core = 1L, RandMatContinuous)
(out <- PrintTree(forest, numTree))
(out.rmc <- PrintTree(forest.rmc, numTree))

rerf documentation built on May 2, 2019, 8:16 a.m.