You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FAQ]Why should we use predict_proba instead of predict when computing ROC AUC? #477
When evaluating a Logistic Regression model with ROC AUC, why should we use the probabilities from predict_proba() instead of the class labels from predict()?
Answer
ROC AUC evaluates how well the model ranks positive examples above negative examples across different thresholds.
predict() returns only the final class labels, such as 0 or 1. This removes most of the information about how confident the model is.
For ROC AUC, we should instead use the probability of the positive class:
y_pred = model.predict_proba(X_val)[:, 1]
auc = roc_auc_score(y_val, y_pred)
These probability scores allow ROC AUC to evaluate the ranking of predictions across different thresholds.
So, for ROC AUC, predict_proba()[:, 1] is more appropriate than predict().
Checklist
I have searched existing FAQs and this question is not already answered
The answer provides accurate, helpful information
I have included any relevant code examples or links
Thank you for your proposal! After analyzing existing FAQs, this question appears to already be covered.
Matching FAQ
Question: When evaluating a Logistic Regression model with ROC AUC, why should we use the probabilities from predict_proba() instead of the class labels from predict()? Document ID: 139ae54c4f Section: module-4
Rationale
The existing FAQ already explains the key distinction: predict(X) returns class labels (0/1) while predict_proba(X)[:, 1] returns class probabilities, which are more appropriate for AUC.
Activity
github-actions commentedon Oct 19, 2026
🔄 Duplicate FAQ Entry
Thank you for your proposal! After analyzing existing FAQs, this question appears to already be covered.
Matching FAQ
Question: When evaluating a Logistic Regression model with ROC AUC, why should we use the probabilities from predict_proba() instead of the class labels from predict()?
Document ID:
139ae54c4fSection: module-4
Rationale
The existing FAQ already explains the key distinction:
predict(X)returns class labels (0/1) whilepredict_proba(X)[:, 1]returns class probabilities, which are more appropriate for AUC.Where to Find This FAQ
_questions/machine-learning-zoomcamp/module-4/🤖 This issue has been automatically closed by FAQ Bot.
If you believe this is an error, please reopen and mention a maintainer.