Evaluate the AdaBoost classifier
Now that you're done training ada
and predicting the probabilities of obtaining the positive class in the test set, it's time to evaluate ada
's ROC AUC score. Recall that the ROC AUC score of a binary classifier can be determined using the roc_auc_score()
function from sklearn.metrics
.
The arrays y_test
and y_pred_proba
that you computed in the previous exercise are available in your workspace.
This exercise is part of the course
Machine Learning with Tree-Based Models in Python
Exercise instructions
Import
roc_auc_score
fromsklearn.metrics
.Compute
ada
's test set ROC AUC score, assign it toada_roc_auc
, and print it out.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Import roc_auc_score
____
# Evaluate test-set roc_auc_score
____ = ____(____, ____)
# Print roc_auc_score
print('ROC AUC score: {:.2f}'.format(ada_roc_auc))