Exercise

Evaluating Random Forest

In this final exercise you'll be evaluating the results of cross-validation on a Random Forest model.

The following have already been created:

  • cv - a cross-validator which has already been fit to the training data
  • evaluator — a BinaryClassificationEvaluator object and
  • flights_test — the testing data.

Instructions

100 XP
  • Print a list of average AUC metrics across all models in the parameter grid.
  • Display the average AUC for the best model. This will be the largest AUC in the list.
  • Print an explanation of the maxDepth and featureSubsetStrategy parameters for the best model.
  • Display the AUC for the best model predictions on the testing data.