CrackML by @ml.with.umang
Interview questions / ML Fundamentals
ML Fundamentals interview question

How do linear and logistic regression differ?

How do linear and logistic regression differ?. Structure your response as you would in a top-tier ML/AI engineering interview.

easyconceptEvidence 75/1001 source reportAmazon

The 60-second answer

Logistic regression models log-odds as a linear function of features and maps them to probabilities with the sigmoid. Training minimizes binary cross-entropy / negative log likelihood; multiclass versions commonly use softmax cross-entropy.

Build the answer in this order

1
Give the core idea

Logistic regression models log-odds as a linear function of features and maps them to probabilities with the sigmoid.

2
Explain how it works

Training minimizes binary cross-entropy / negative log likelihood; multiclass versions commonly use softmax cross-entropy.

3
Compare alternatives

Regularization controls variance and can induce sparsity; standardized features make penalty strength easier to interpret.

4
State failure modes + validation

Evaluate discrimination and calibration separately, then choose thresholds based on error costs.

A useful interview mental model

This is the shape of a strong answer—not a script to memorize.

01Definition
02Mechanism
03Trade-offs
04Failure modes
05When to use

Senior-level signal

  • Perfect separation can drive unregularized maximum-likelihood coefficients toward infinity.
  • For production decisions, monitor calibration and base-rate shift, not only AUC.

What the interviewer is really testing

Mechanistic understanding, assumptions, trade-offs, and whether you can turn a definition into a model decision.

Likely follow-up questions

What assumption makes this approach work?
When would you choose the strongest alternative instead?
What production or data failure mode changes your answer?

Common weak-answer patterns

  • Reciting a definition without mechanism or assumptions.
  • Claiming one technique is always better without a data regime.
  • Stopping before failure modes, validation, or deployment implications.