← Amazon Interview Insights

Amazon·Machine Learning Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Amazon ML engineer screen, just one technical question about logistic regression. Pretty short exchange from what I can tell.

Questions Asked (1)

Q1

What is logistic regression, and why do we use the log transformation in it?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

The second part is where people slip up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining logistic regression as a linear model for binary classification that outputs probabilities via the sigmoid function. Then explain that the log transformation (log-odds or logit) linearizes the relationship between inputs and the target, enabling the use of linear regression techniques while ensuring outputs are valid probabilities. Finally, connect this to why we use log loss for training.

Pro tip: Emphasize that the log-odds transformation is not just a mathematical trick—it aligns with the exponential family assumption and makes the model interpretable via odds ratios, which is crucial for business decisions at Amazon.

1. Define logistic regression

Explain that it's a binary classification algorithm that models the probability of an instance belonging to a class using the logistic (sigmoid) function.

2. Explain the need for transformation

Discuss that linear regression predicts unbounded values, but probabilities must be between 0 and 1. The logit transformation maps probabilities to the entire real line, allowing a linear relationship.

3. Describe the logit function

Define logit(p) = log(p/(1-p)), which is the log-odds. Show how logistic regression models log-odds as a linear combination of features.

4. Connect to training and loss

Mention that the log transformation leads to the log loss (cross-entropy) function, which is convex and efficient to optimize.

5. Highlight benefits and trade-offs

Summarize advantages: interpretability (odds ratios), probabilistic outputs, and efficiency. Note limitations: assumes linear decision boundary and can be sensitive to outliers.

Key Points to Mention

  • Sigmoid function and its role in mapping linear outputs to probabilities
  • Log-odds (logit) transformation and its linearizing effect
  • Maximum likelihood estimation and log loss (cross-entropy)
  • Interpretability of coefficients as odds ratios
  • Comparison to linear regression and why it's unsuitable for classification
  • Convexity of the loss function ensuring global optimum

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