rforest | R Documentation |
Random Forest using Ranger
rforest(
dataset,
rvar,
evar,
type = "classification",
lev = "",
mtry = NULL,
num.trees = 100,
min.node.size = 1,
sample.fraction = 1,
replace = NULL,
num.threads = 12,
wts = "None",
seed = NA,
data_filter = "",
arr = "",
rows = NULL,
envir = parent.frame(),
...
)
dataset |
Dataset |
rvar |
The response variable in the model |
evar |
Explanatory variables in the model |
type |
Model type (i.e., "classification" or "regression") |
lev |
Level to use as the first column in prediction output |
mtry |
Number of variables to possibly split at in each node. Default is the (rounded down) square root of the number variables |
num.trees |
Number of trees to create |
min.node.size |
Minimal node size |
sample.fraction |
Fraction of observations to sample. Default is 1 for sampling with replacement and 0.632 for sampling without replacement |
replace |
Sample with (TRUE) or without (FALSE) replacement. If replace is NULL it will be reset to TRUE if the sample.fraction is equal to 1 and will be set to FALSE otherwise |
num.threads |
Number of parallel threads to use. Defaults to 12 if available |
wts |
Case weights to use in estimation |
seed |
Random seed to use as the starting point |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
arr |
Expression to arrange (sort) the data on (e.g., "color, desc(price)") |
rows |
Rows to select from the specified dataset |
envir |
Environment to extract data from |
... |
Further arguments to pass to ranger |
See https://radiant-rstats.github.io/docs/model/rforest.html for an example in Radiant
A list with all variables defined in rforest as an object of class rforest
summary.rforest
to summarize results
plot.rforest
to plot results
predict.rforest
for prediction
rforest(titanic, "survived", c("pclass", "sex"), lev = "Yes") %>% summary()
rforest(titanic, "survived", c("pclass", "sex")) %>% str()
rforest(titanic, "survived", c("pclass", "sex"), max.depth = 1)
rforest(diamonds, "price", c("carat", "clarity"), type = "regression") %>% summary()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.