powered by
Trains a Random Forest regression model.
train_rf(data, formula, ntree = 500, seed = 123)
A trained randomForest model object.
A data frame containing the training data.
A formula describing the model structure.
Number of trees to grow (default 500).
Random seed for reproducibility (default 123).
# \donttest{ library(randomForest) data(mtcars) rf_model <- train_rf(mtcars, mpg ~ cyl + hp + wt, ntree = 100) print(rf_model) # }
Run the code above in your browser using DataLab