brifTree {brif}R Documentation

Build a single brif tree of a given depth

Description

This is a wrapper for brif to build a single tree of a given depth. See brifTree.default and brifTree.formula for details.

Usage

brifTree(x, ...)

Arguments

x

a data frame or a formula object.

...

arguments passed on to brifTree.formula or brifTree.default.

Value

an object of class brif. See brif.default for details.

Examples

# Build a single tree
bt <- brifTree(Species ~., data = iris, depth = 3)

# Print out the decision rules
printRules(bt)

# Get the accuracy on the training set
sum(predict(bt, newdata = iris, type = 'class') == iris[,'Species'])/nrow(iris)


[Package brif version 1.4.1 Index]