ZZomato·Tech KnowledgeL2DSA Round

F1-Score vs Accuracy for Imbalanced Datasets

Problem When would you prefer F1-Score over Accuracy as an evaluation metric?

Be ready to discuss

  • Why accuracy misleads under class imbalance: with a 99:1 split, always predicting the majority class scores 99% accuracy and catches nothing.
  • What F1 measures: the harmonic mean of precision and recall, so it punishes a model that inflates one at the expense of the other and it focuses on the minority/positive class.
  • Precision vs. recall individually, and picking by cost asymmetry — false positives and false negatives rarely cost the same.
  • Threshold dependence: F1 is computed at a single operating point, while PR-AUC or ROC-AUC summarize across thresholds; PR curves are the more honest choice on skewed data.
  • Variants and when they apply: macro vs. micro vs. weighted F1 in the multi-class case, and F-beta when recall matters more than precision (or vice versa).
  • Complementary approaches: class weighting/resampling during training, and inspecting the confusion matrix rather than trusting a single scalar.
asked …
LeaderboardSalaryAccount