Topic 34: Discriminative vs Generative Models
π₯ For interviews, read these first:
DISCRIMINATIVE_VS_GENERATIVE_DEEP_DIVE.mdβ frontier-lab deep dive: vs , Naive Bayes derivation, LDA/QDA decision boundaries, LDA = linear boundary same as logistic regression, Ng & Jordan sample-complexity result, HMM, modern generative models (VAE/GAN/diffusion/LLM), when each wins.INTERVIEW_GRILL.mdβ 50 active-recall questions.
What Youβll Learn
- The fundamental D vs G distinction: what each model estimates
- Naive Bayes for text classification (Laplace smoothing, log-prob)
- Gaussian Discriminant Analysis: LDA (linear) vs QDA (quadratic)
- Why LDA and logistic regression have the same linear form but different training
- Sample-complexity trade-offs (generative wins small data when assumption correct)
- HMMs as the canonical generative sequence model
- Modern generative models (VAE, GAN, diffusion, LLM) β what they actually model
Why This Matters
A common interview question β βis logistic regression generative or discriminative?β β separates candidates who memorized labels from those who understand what each model is doing. The Ng & Jordan result + LDA-vs-logistic comparison are also frequently probed.
Next Steps
- Topic 1: Logistic regression β discriminative classifier in depth.
- Topic 19: GMM clustering β generative latent-variable model.
- Topic 40: Diffusion models β modern generative.
- Topic 43: Language modeling losses β LLM as generative.