chwil
chwil

Reputation: 51

ROC-Curve calculation of elements

I know that the ROC-Curve is calculated from the True-Positive-Rate and the False-Positive-Rate.

But the ROC-Curve has infinite Elements on it's Curve, right? How is each Element calculated? Can someone explain this to me? Where is each point coming from?

Example

Thanks in Advance

Upvotes: 0

Views: 62

Answers (1)

Stanislas Morbieu
Stanislas Morbieu

Reputation: 1827

The values are calculated for all values of the threshold of the classifier.

On the x axis, you have the "false positive rate" for the given threshold: FPR = FP / (TN + FP) where:

  • FP are the number of false positive (the elements predicted positive but which are negative);
  • TN the number of true negative (the elements predicted negative and are really negative);
  • and FP the number of false positive (the elements predicted positive but are negative).

On the y axis, you have the "true positive rate" for the given threshold: TPR = TP / (TP + FN) where:

  • TP are the number of true positive (predicted positive and are indeed positive);
  • FN the number of false negative (predicted negative but are positive).

You have not an infinite number of points in practice: you are limited to the number of points of the dataset (the rate dont change for some ranges of threshold).

Upvotes: 1

Related Questions