← Pinterest Interview Insights

Pinterest·Machine Learning Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Pinterest ML engineer interview had at least one multiple-choice question on confusion matrices, which sounds easy until you're second-guessing which axis is which under pressure.

Questions Asked (1)

Q1

Given a confusion matrix, compute precision, recall, F1, accuracy, and specificity. Also interpret the matrix correctly given the axis labeling shown.

Product Analytics & MetricsAlgorithms & Data Structures
Author's notes

Multiple choice format, which made it feel easier than it was.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, carefully read the axis labels to correctly identify true positives, false positives, false negatives, and true negatives. Then, write down the formulas for precision, recall, F1, accuracy, and specificity, and plug in the numbers. Finally, interpret the metrics in the context of the problem, discussing trade-offs and business implications.

Pro tip: Always state the assumptions about the positive class and axis orientation before calculating; a common mistake is swapping precision and recall due to misreading the matrix. Also, relate the metrics to the business context (e.g., Pinterest's recommendation system) to show practical understanding.

1. Parse the confusion matrix

Identify the layout: which axis represents actual and predicted labels, and which class is positive. Extract TP, FP, FN, TN.

2. Write down formulas

Recall the definitions: Precision = TP/(TP+FP), Recall = TP/(TP+FN), F1 = 2*Precision*Recall/(Precision+Recall), Accuracy = (TP+TN)/(TP+TN+FP+FN), Specificity = TN/(TN+FP).

3. Compute metrics

Plug in the extracted values and calculate each metric. Show your work to avoid arithmetic errors.

4. Interpret results

Explain what each metric means in the context of the problem. Discuss trade-offs, e.g., high precision vs. high recall, and which metric matters most for the given application.

5. Discuss limitations and extensions

Mention that accuracy can be misleading with imbalanced data, and suggest alternatives like AUC-ROC or precision-recall curves if relevant.

Key Points to Mention

  • Correct identification of TP, FP, FN, TN from the matrix, emphasizing axis labels.
  • Precise formulas for precision, recall, F1, accuracy, and specificity.
  • The importance of the positive class definition and how it affects metrics.
  • Trade-offs between precision and recall, and when to prioritize one over the other.
  • The effect of class imbalance on accuracy and why other metrics may be more informative.
  • Business context: how these metrics relate to Pinterest's goals (e.g., user engagement, content recommendation).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.