BaşlayınÜcretsiz Başlayın

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.

Bu egzersiz

Machine Learning with Tree-Based Models in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Import roc_auc_score from sklearn.metrics.

  • Compute ada's test set ROC AUC score, assign it to ada_roc_auc, and print it out.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import roc_auc_score
____

# Evaluate test-set roc_auc_score
____ = ____(____, ____)

# Print roc_auc_score
print('ROC AUC score: {:.2f}'.format(ada_roc_auc))
Kodu Düzenle ve Çalıştır