
Implementation of Breiman's random forest algorithm (based on Breiman and Cutler's original Fortran code) for classification and regression.
RandomForestModel(
ntree = 500,
mtry = .(if (is.factor(y)) floor(sqrt(nvars)) else max(floor(nvars/3), 1)),
replace = TRUE,
nodesize = .(if (is.factor(y)) 1 else 5),
maxnodes = NULL
)
number of trees to grow.
number of variables randomly sampled as candidates at each split.
should sampling of cases be done with or without replacement?
minimum size of terminal nodes.
maximum number of terminal nodes trees in the forest can have.
MLModel
class object.
factor
, numeric
mtry
, nodesize
*
* included only in randomly sampled grid points
Default values for the NULL
arguments and further model details can be
found in the source link below.
# NOT RUN {
fit(sale_amount ~ ., data = ICHomes, model = RandomForestModel)
# }
Run the code above in your browser using DataLab