Session Ready
Exercise

Beyond only accuracy

In this exercise, to go beyond just looking at accuracy, you will evaluate AUC of the ROC curve for a basic decision tree model. Remember that the baseline comparison for a random classifier is an AUC of 0.5, so you will want to achieve a higher score than 0.5.

X is available as the DataFrame with features, and y is available as a DataFrame with target values. Both sklearn and pandas as pd are also available in your workspace.

We will use this set up to look at the AUC of our ROC curve.

Instructions
100 XP
  • Split the data into training and testing sets.
  • Fit the classifier using training data to make predictions for testing data using predict_proba() and predict().
  • Evaluate the AUC under the ROC curve using the roc_curve() function on y_test via roc_curve(y_test, y_score[:, 1]).