forestr: Classification and Regression with Random Forest and Choice...

Description Usage Arguments Value Examples

Description

Runs a random forest with user specified splitting criteria using the forestr function.

Usage

1
2
3
4
forestr(formula, data, mvars, B = 500, min_size, method, ...)

## S3 method for class 'forestr'
print(x, ...)

Arguments

formula, x

formula specification of forest variables, (for the print method, a forestr object)

data

dataframe with y and x variables

mvars

number of variables to sample in each node of the tree during building the random forest

B

number of bootstrap samples

min_size

minimum size of a terminal node

method

optional splitting method, currently "extremes" and "purity" implemented.

...

extra parameters to pass to rpart

Value

An object of class forestr with components

call

the original call to forest

type

one of regression or classification

predicted

the predicted values of the input data based on out of bag samples

importance

mean decrease in accurace over all classes for each variable in the model

votes

matrix giving the votes for each class on each observation (classification)

oob

out of bag error for the model including confusion matrix (classification)

trees

random forest tree objects

Examples

1
forestr(factor(cyl) ~ ., data = mtcars)

andeek/forestr documentation built on May 12, 2019, 2:40 a.m.