ROC Curve

Compare the ROC curves for models.

In the first attempt, we saw improvements using random forest. Then, we did the hyperparameter tuning using randomized and grid search. We have the following three models based on random forest trees and their predicted classes.

  • rfc and the predicted classes for test data in rfc_pred

  • random_search_rfc and the predicted classes for test data in random_search_rfc_pred

  • grid_search_rfc and the predicted classes for test data in grid_search_rfc_pred

Let’s get the ROC curves for these three models for crude comparisons. We might be able to improve the model with the grid search. However, that will be a little time-consuming.

Predicted probabilities

To get the ROC curve, we need predicted probabilities for the observations from each model.

Get hands-on with 1400+ tech skills courses.