brifTree | R Documentation |
This is a wrapper for brif
to build a single tree of a given depth. See brifTree.default
and brifTree.formula
for details.
brifTree(x, ...)
x |
a data frame or a |
... |
arguments passed on to |
an object of class brif
. See brif.default
for details.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.