Neuron 101

Classification / ROC curve

Türkçe

Plate42

Unit 4 · Topic 10 of 10

ROC curve

Medium, 7 min, 7 steps

00.250.500.75100.250.500.751false positive ratetrue positive ratecoin flip
Keyboard: left and right arrows change the step, space plays and pauses.

Step 1 of 7 Axes

Two rates

The horizontal axis is the false positive rate: of the days that did not sell out, how many were called sold out. The vertical axis is the true positive rate, that is recall. The dashed diagonal is where a coin-flipping model sits.

Open in Colab
  1. def roc(p, s):
  2. esikler = [float("inf")]
  3. esikler += sorted(set(p),
  4. reverse=True)
  5. noktalar = []
  6. for e in esikler:
  7. dp, yp, yn, dn = \
  8. matris(p, s, e)
  9. ypo = yp / (yp + dn)
  10. dpo = dp / (dp + yn)
  11. noktalar.append((ypo, dpo))
  12. return noktalar
esik
0.50
dpo
0.88
ypo
0.13
auc
0.95