Should I be using y_pred or y_pred_proba for binary Classification?

I have a binary classification problem and i want to plot ROC/AUC curve, should I use ypred or ypred_proba

Topic auc roc machine-learning

Category Data Science


y_pred_proba gives the predicted probability.

y_pred takes the probability and then rounds to category $0$ or category $1$.

You need some kind of continuum of values in order to vary the classification threshold and draw a ROC curve, so use y_pred_proba.


It depends on what Client want as an outcome. Two cases to be mentioned here.

Case-1: If client wants just the Predicted Class go with y_pred, as it outputs the class.
Case-2: If client wants the probability of that record belongs to a specific class go with y_pred_proba

Note: Most of the times the actual probability and predicted probability might have a huge difference, so need to calibrate the model(Platt, Isotonic)

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.