Explain Logistic Regression Fundamentals

Quick Overview

This question evaluates understanding of logistic regression fundamentals, covering probabilistic modeling, Bernoulli likelihood and logit-link derivation, loss and gradient characterization, calibration and miscalibration remedies, regularization trade-offs, feature scaling and interactions, class imbalance strategies, evaluation metrics for skewed data, coefficient interpretation, and common failure modes. It is commonly asked in technical interviews to assess both theoretical and practical competencies in supervised learning within the Machine Learning domain, with a level of abstraction spanning conceptual derivation and practical application of model behavior and evaluation.

Explain Logistic Regression Fundamentals

Company: Amazon

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Onsite

Explain logistic regression from first principles. Derive the log-loss and gradients, discuss the logit link function, decision thresholds, and calibration. Compare L1 vs L2 regularization, effects of feature scaling and interactions, handling of class imbalance, and appropriate evaluation metrics for imbalanced data. Include interpretability considerations (odds ratios) and common failure modes.

Quick Answer: This question evaluates understanding of logistic regression fundamentals, covering probabilistic modeling, Bernoulli likelihood and logit-link derivation, loss and gradient characterization, calibration and miscalibration remedies, regularization trade-offs, feature scaling and interactions, class imbalance strategies, evaluation metrics for skewed data, coefficient interpretation, and common failure modes. It is commonly asked in technical interviews to assess both theoretical and practical competencies in supervised learning within the Machine Learning domain, with a level of abstraction spanning conceptual derivation and practical application of model behavior and evaluation.

|Home/Machine Learning/Amazon
Amazon logo
Amazon
Sep 6, 2025, 12:00 AM
hardMachine Learning EngineerOnsiteMachine Learning
4
0

Logistic Regression from First Principles

Assumptions and Notation

  • Binary classification with labels y ∈ {0, 1} and features x ∈ R^d.
  • Linear score z = wᵀx + b; probability p(x) = P(y=1 | x).

Tasks

  1. Derive logistic regression starting from a Bernoulli likelihood and the logit link.
  2. Derive the negative log-likelihood (log-loss) and gradients for w and b.
  3. Explain the logit link function and how decision thresholds relate to costs.
  4. Discuss probability calibration: when it works, how to measure it, and how to fix miscalibration.
  5. Compare L1 vs L2 regularization (optimization, sparsity, correlation, calibration).
  6. Explain effects of feature scaling and modeling interactions.
  7. Describe strategies for handling class imbalance.
  8. Choose appropriate evaluation metrics for imbalanced data.
  9. Interpret coefficients via odds and odds ratios.
  10. Identify common failure modes and guardrails.
Loading comments...