get_tree {fastAdaboost}R Documentation

Fetches a decision tree

Description

returns a single weak decision tree classifier which is part of the strong classifier

Usage

get_tree(object, tree_num)

Arguments

object

object of class adaboost

tree_num

integer describing the tree to get

Details

returns an individual tree from the adaboost object This can provide the user with some clarity on the individual building blocks of the strong classifier

Value

object of class rpart

See Also

adaboost

Examples

fakedata <- data.frame( X=c(rnorm(100,0,1),rnorm(100,1,1)), Y=c(rep(0,100),rep(1,100) ) )
fakedata$Y <- factor(fakedata$Y)
test_adaboost <- adaboost(Y~X, fakedata, 10)
tree <- get_tree(test_adaboost,5)

[Package fastAdaboost version 1.0.0 Index]