1. Learn
  2. /
  3. Courses
  4. /
  5. Advanced Dimensionality Reduction in R

Exercise

Training a random forest with original data

In this exercise, we are going to train a random forest using the original fashion MNIST dataset with 500 examples. This dataset is preloaded in the environment with the name fashion_mnist. We are going to train a random forest with 20 trees and we will look at the time it takes to compute the model and the out-of-bag error in the 20th tree.

The randomForest package is loaded.

Instructions

100 XP
  • Get the starting timestamp using proc.time().
  • Train a random forest with 20 trees using fashion_mnist$label as the target class.
  • Get the amount of time by calling timetaken() and store the result in time_end.
  • Show the out-of-bag error in the 20th tree.