Is logistic regression a generative or a discriminative classifier, and why?

Quick Overview

Asks whether logistic regression is a generative or a discriminative classifier and asks for the reasoning behind the label. Tests your grasp of conditional versus joint modeling, the link to Gaussian Naive Bayes and LDA, and when each kind of model does better.

Is logistic regression a generative or a discriminative classifier, and why?

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Is logistic regression a generative or a discriminative classifier, and why? ```hint What the likelihood contains Write down the quantity logistic regression maximizes during training. Does any term in it describe how the features $x$ are distributed? ``` ```hint A generative counterpart Think of a generative model whose $P(y \mid x)$ comes out in exactly the logistic form, then compare how the two estimate their parameters. ``` ### What a Strong Answer Covers - The classification, with a definition of discriminative and generative models - What logistic regression's training objective contains and what it leaves out - A generative model that implies the same logistic form, and how its parameter estimates differ - When each approach tends to do better (amount of data, wrong modeling assumptions, missing features) ### Follow-up Questions - Derive the log-odds for two Gaussian classes that share one covariance matrix. - With 200 labeled examples and 50 features, would you expect Naive Bayes or logistic regression to do better, and why? - How would each model handle a feature that is missing at prediction time? - Can logistic regression be used to generate new samples of $x$?

Overview: Asks whether logistic regression is a generative or a discriminative classifier and asks for the reasoning behind the label. Tests your grasp of conditional versus joint modeling, the link to Gaussian Naive Bayes and LDA, and when each kind of model does better.

Nov 24, 2026
mediumData ScientistOtherMachine Learning
0
0

Is logistic regression a generative or a discriminative classifier, and why?

What a Strong Answer Covers Guidance

  • The classification, with a definition of discriminative and generative models
  • What logistic regression's training objective contains and what it leaves out
  • A generative model that implies the same logistic form, and how its parameter estimates differ
  • When each approach tends to do better (amount of data, wrong modeling assumptions, missing features)

Follow-up Questions Guidance

  • Derive the log-odds for two Gaussian classes that share one covariance matrix.
  • With 200 labeled examples and 50 features, would you expect Naive Bayes or logistic regression to do better, and why?
  • How would each model handle a feature that is missing at prediction time?
  • Can logistic regression be used to generate new samples of xx ?