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.
Deze oefening maakt deel uit van de cursus
Machine Learning with Tree-Based Models in Python
Oefeninstructies
Import
roc_auc_scorefromsklearn.metrics.Compute
ada's test set ROC AUC score, assign it toada_roc_auc, and print it out.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Import roc_auc_score
____
# Evaluate test-set roc_auc_score
____ = ____(____, ____)
# Print roc_auc_score
print('ROC AUC score: {:.2f}'.format(ada_roc_auc))