Session Ready
Exercise

Predicting data using embedding random forest

Now, we are going to do the same analysis, but instead of using the random forest trained with the original features, we will make predictions using the random forest trained with the t-SNE embedding coordinates.

The random forest model is pre-loaded in an object named rf_model_tsne and the t-SNE embedding features from the original test set are stored in the object test_x. Finally, the test set labels are stored in creditcard_test. The randomForest and ROCR packages have been loaded for you.

Instructions
100 XP
  • Generate predictions with probabilities using the random forest model rf_model_tsne and the test set test_x.
  • Plot a histogram of the predicted probabilities for the positive class.
  • Compute the AUC using the function prediction() and performance() from the ROCR package and the Class from creditcard_test.
  • Select the y.values attribute from perf, where the AUC is stored.