Trusted answers to developer questions

What are ROC curves?

Get the Learn to Code Starter Pack

Break into tech with the logic & computer science skills you’d learn in a bootcamp or university — at a fraction of the cost. Educative's hand-on curriculum is perfect for new learners hoping to launch a career.

Receiver Operating Characteristic (ROC) curves summarize the trade-off between the true positive rate (TPR) and the false positive rate (FPR) for a predictive model using different probability thresholds.

ROC curves are appropriate when observations are balanced between each class in the dataset.

Sample ROC curve.
Sample ROC curve.

The ROC curve is plotted with TPR (also represented as Sensitivity) against the FPR (also represented as 1 - Specificity) where TPR is on the y-axis and FPR is on the x-axis. The formula to calculate these values is:

TPR=Sensitivity=TruePositives/(TruePositives+FalseNegatives)TPR = Sensitivity = True Positives / (True Positives + False Negatives) and FPR=1Specificity=TrueNegatives/(TrueNegatives+FalsePositives)FPR = 1 - Specificity = True Negatives / (True Negatives + False Positives)

The ROC curve is a useful tool because:

  • The curves of different models can be compared directly in general.
  • The area under the curve (AUC) can be used as a summary of the model skill.

RELATED TAGS

roc
curve
machine
learning
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?