Session Ready
Exercise

Measuring AUC

Now that you've used cross-validation to compute average out-of-sample accuracy (after converting from an error), it's very easy to compute any other metric you might be interested in. All you have to do is pass it (or a list of metrics) in as an argument to the metrics parameter of xgb.cv().

Your job in this exercise is to compute another common metric used in binary classification - the area under the curve ("auc"). As before, churn_data is available in your workspace, along with the DMatrix churn_dmatrix and parameter dictionary params.

Instructions
100 XP
  • Perform 3-fold cross-validation with 5 boosting rounds and "auc" as your metric.
  • Print the "test-auc-mean" column of cv_results.