A poor man's implementation of random forest (Breiman, 2001) with the option to incorporate random rotations as described in Blaser and Fryzlewicz (2016).
rforest(X, y, mtry = NULL, ntree = 500, rotate = FALSE, ...)
An object of class "rforest"
, which is essentially a list of
rftree objects.
A data frame or a matrix of predictors.
Numeric vector of response value. For binary outcomes, y
should be mapped to {0, 1}. Note that multiclass outcomes are not supported.
Integer specifying the number of variables randomly sampled as
candidates splitters at each node in a tree. Note that the default values are
different for classification (floor(sqrt(p))
where p
is number
of columns of X
) and regression floor(p/3)
).
Integer specifying the number of trees to grow. This should not
be set to too small a number, to ensure that every input row gets predicted
at least a few times. Default is 500
.
Logical indicating whether or not to randomly rotate the
feature values prior to fitting each tree. Default is FALSE
which
results in a traditional random forest.
Optional arguments to be passed on to
randomForest
(e.g., nodesize = 10
).
Breiman, Leo. (2001), Random Forests, Machine Learning 45(1), 5-32.
Rico Blaser and Piotr Fryzlewicz. Random rotation ensembles. Journal of Machine Learning Research, 17:1–26, 2016.