Random Forests with tidymodels
Learn how to train a random forest ensemble using tidymodels.
We'll cover the following...
We'll cover the following...
Training a random forest
One advantage of the workflow approach of tidymodels is the ability to change the machine learning algorithm quickly. The following code compares using a CART classification tree vs. a random classification forest.
The code above uses the rand_forest() function from the parsnip package to specify using the random forest algorithm with default hyperparameter values. The code further specifies using the randomForest package’s algorithm to train a random classification forest via the ...