Answer core ML fundamentals questions

Read the full interview experience this question came from →

Quick Overview

This question evaluates a candidate's mastery of core Machine Learning fundamentals, including classification metrics (precision and recall) with confusion-matrix interpretation, gradient concepts for optimization, ensemble learning tradeoffs, and the mechanics of a neural network forward pass.

Answer core ML fundamentals questions

Company: Pinterest

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Online Assessment

You are asked several short ML fundamentals questions: 1) Define **precision** and **recall** for a binary classifier and explain how they relate to a confusion matrix. 2) Given a confusion matrix (TP, FP, TN, FN), compute precision and recall and explain what types of errors increase/decrease each metric. 3) Answer basic questions about **gradients** (e.g., what a gradient represents, and how it is used in gradient descent). 4) Discuss common **ensemble learning tradeoffs** (e.g., bagging vs boosting, bias–variance, compute/latency). 5) Do a simple **neural network forward pass by hand** for a small feed-forward network (matrix multiply + bias + activation) and produce the final output.

Overview: This question evaluates a candidate's mastery of core Machine Learning fundamentals, including classification metrics (precision and recall) with confusion-matrix interpretation, gradient concepts for optimization, ensemble learning tradeoffs, and the mechanics of a neural network forward pass.

Read the full Pinterest Machine Learning Engineer interview experience this question came from

Community answers

Answer by swemleds

Precision indicates how many positive predictions of a model is actually right, focusing on False Positive. Recall indicates how many actual positives the model correctly captures, focusing on False Negative. precision = TP / (TP + FP); Recall = TP / (TP + FN); predicting an actual positive as negative more decreases recall, while predicting an actual negative as positive decreases precision gradients represent the direction and rate of steepest increase of a function at a certain location; it minimizes loss function at gradient descent by leading it to the steepest decreasing direction which is an opposite of gradient's own Bagging trains model independently own sampled train data sets to reduce variance, boosting trains model sequentially to improve previous errors and improve bias. Ensemble usually improve model accuracy while leaving higher computing cost and inference latency. order below input layer gets input (input X a matrix or vector sometimes reshapes to fit the input layer dimension) at the next layers, say a dense layer, X is updated with wX + b where w is weight and b is bias; then activation function like relu is applied to get non-linearity after several layers, depending on the goal of a task (classification, regression, etc), the output layer makes prediction using task-specific activation. furthermore to the forward pass, during backward pass or propagation, weights and biases are updated through gradient descent application to loss function with predicted
Pinterest logo
Pinterest
Feb 9, 2026
hardMachine Learning EngineerOnline AssessmentMachine Learning
41
0

You are asked several short ML fundamentals questions:

  1. Define precision and recall for a binary classifier and explain how they relate to a confusion matrix.
  2. Given a confusion matrix (TP, FP, TN, FN), compute precision and recall and explain what types of errors increase/decrease each metric.
  3. Answer basic questions about gradients (e.g., what a gradient represents, and how it is used in gradient descent).
  4. Discuss common ensemble learning tradeoffs (e.g., bagging vs boosting, bias–variance, compute/latency).
  5. Do a simple neural network forward pass by hand for a small feed-forward network (matrix multiply + bias + activation) and produce the final output.