Explain how the ROC curve works?

A ROC curve (receiver operating characteristic) is a graph that shows the performance of a classification model at all classification thresholds. It plots two parameters -

  • True positive rate
  • False-positive rate

True Positive Rate (TPR) is defined as follows:

TPR = TP/(TP+FN)

False Positive Rate (FPR) is defined as follows:

FPR = FP/(FP+TN)