Exercise

Training a random forest with embedding features

In this exercise, we are going to train a random forest model using the embedding features from the previous t-SNE embedding. So, in this case, we are going to use a two-dimensional dataset that has been generated from the original input features.

In the rest of the chapter, we are going to verify if we have a worse, similar, or better performance for this model in comparison to the random forest trained with the original features.

In the environment two objects named train_tsne_x and train_tsne_y that contain the features and the Class variable are available. The randomForest package has been loaded as well.

Instructions

100 XP
  • Fix the seed to 1234.
  • Train a random forest named rf_model_tsne with 100 trees.
  • Plot the error evolution.
  • Plot the variable importance of input variables.