Conduct a tidy random forest analysis with hyperparameter tuning via tidymodels framework
tidy_forest.Rd
Conduct a tidy random forest analysis with hyperparameter tuning via tidymodels framework
Usage
tidy_forest(
data,
outcome_var,
drop_vars = NULL,
split_prop = 0.5,
num_threads = 6,
importance = "permutation",
mode = "classification",
num_trees = 500,
levels = 5,
best_metric = "accuracy",
...
)
Arguments
- data
A data frame
- outcome_var
A string representing outcome variable
- drop_vars
A vector of strings representing variables to drop
- split_prop
A number representing proportion of data to use for training
- num_threads
A number representing number of threads to use
- importance
A string representing importance method
- mode
A string representing mode
- num_trees
A number representing number of trees
- levels
A number representing number of levels
- best_metric
A string representing best metric
- ...
Additional arguments to pass to parsnip::rand_forest()