Pick Macro or Micro F1 for Gmail Inbox Category Tabs

Last updated: November 29, 2026

Quick Overview

A model routes Gmail messages into Primary, Social, Promotions, Updates, and Forums. Explain the difference between micro and macro averaged F1 for this multi-class problem and which you would report to the product team.

Google
Machine Learning
Data Scientist
Google
November 29, 2026
Data Scientist
Phone Screen
Machine Learning
Easy

0

0

0 solved


A model routes Gmail messages into Primary, Social, Promotions, Updates, and Forums. Explain the difference between micro and macro averaged F1 for this multi-class problem and which you would report to the product team.

Gmail classification tasks are heavily skewed: most mail is Promotions or Updates while Forums is small. Interviewers use this to check that you understand how averaging choices hide or expose performance on small classes, and that you tie the metric to user harm.

What the Interviewer Expects
  • Defines per-class precision, recall and F1
  • Explains micro averaging pools counts and equals accuracy for single-label multi-class
  • Explains macro averaging gives each class equal weight
  • Shows a small example where the two diverge
  • Recommends reporting per-class numbers plus the confusion that matters (Primary misrouted)
Key Topics to Cover
macro F1
micro F1
multi-class evaluation
class imbalance
confusion matrix
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • What about weighted F1, and when is it useful?
  • Which single confusion between tabs is most harmful to users and why?
  • How would you set different thresholds per class?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Confirm it is single-label (each message goes to exactly one tab), the class distribution, and which mistakes hurt most. Missing an important personal email because it landed in Promotions is far wors...

Approach

For each class compute precision and recall from the confusion matrix, then F1 as their harmonic mean. Micro averaging sums TP, FP, and FN over all classes before computing F1. In single-label multi-c...


Submit Your Answer
Markdown supported