AP Vs AUC-ROC

MetricCurveBest ForKey Difference
Average PrecisionPrecision-RecallImbalanced dataFocuses on positive class
AUC-ROCROC (TPR vs FPR)Balanced dataConsiders both classes equally

When to use AP:

  • Highly imbalanced datasets (e.g., fraud detection, anomaly detection)
  • When false positives and false negatives have different costs
  • When you care primarily about the positive class

When to use AUC-ROC:

  • Balanced datasets
  • When both classes are equally important
  • Standard binary classification