Description Usage Arguments Examples
Runs random forest with grid-search for hyper parameters.
1 2 3 4 5 6 7 8 9 10 11 12 |
formula |
Formula for model specification. |
train_df |
An input dataframe with |
probability |
Logical. Whether predicted values are probabilities or
|
predict_df |
(Optional) A dataframe matching |
mtry |
(Optional) Numeric vector including all values to try. Defines number of variables available for splitting at each tree node. |
node_size |
(Optional) Numeric vector including all values to try. Defines minimum number of observations in a terminal node. |
num_trees |
(Optional) Numeric vector including all values to try. Defines number of trees to grow. |
nfolds |
(Optional) Numeric value. Use to specify number of CV folds. |
error_type |
(Optional) String of either "CV" or "OOB" for error type to use for choosing optimal hyper parameters. |
verbose |
(Optional) Logical. Whether to print progress or not. |
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
idx <- train_test_validate(iris$Sepal.Length, train.p = .6, test.p = .2)
initialize_parallel()
rf_model <- rf(train_df = iris[idx$train, ],
formula = Sepal.Length ~ .,
probability = FALSE,
predict_df = iris[idx$validate, ])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.