Session Ready
Exercise

Train a Random Forest model

Here you will use the randomForest() function from the randomForest package to train a Random Forest classifier to predict loan default.

Instructions
100 XP

The credit_train and credit_test datasets (from Chapter 1 & 3) are already loaded in the workspace.

  • Use the randomForest::randomForest() function to train a Random Forest model on the credit_train dataset.
  • The formula used to define the model is the same as in previous chapters -- we want to predict "default" as a function of all the other columns in the training set.
  • Inspect the model output.