0

I am trying to plot ROC curve in sklearn. The results below are the predicted values (y_score) and the labels (labels). Is it possible to plot roc_curve from that or must one have the raw probabilities?

y_score
[1, 0, 0, 1, 10, 5, 12, 14, 6, 9, 10]
labels
[1, 0, 0, 1, 10, 5, 11, 14, 6, 9, 8]

I am using this guide.

iacob
  • 20,084
  • 6
  • 92
  • 119
Max Neil
  • 3
  • 1
  • 1
    Does this answer your question? [ROC for multiclass classification](https://stackoverflow.com/questions/45332410/roc-for-multiclass-classification) – iacob May 12 '21 at 09:31
  • Ah - I get you now. No, you can't plot a ROC curve from the predicted labels only. A ROC curve is a measure of how the TPR and FPR vary _as you vary the decision threshold for the labels_. – iacob May 12 '21 at 11:45

1 Answers1

0

No, you can't plot a ROC curve from the predicted labels only. A ROC curve is a measure of how the TPR and FPR vary as you vary the decision threshold for the labels. If you only have labels, you have a fixed decision threshold already.

iacob
  • 20,084
  • 6
  • 92
  • 119