EasyDeepLearn

Generative vs discriminative classifier — what's the difference?

medium

Answer

  • A discriminative model learns P(yx)P(y \mid x) directly (logistic regression, SVM, neural nets).
  • A generative model learns P(x, y) or P(xy)P(x \mid y) and applies Bayes' rule to get P(yx)P(y \mid x) (Naive Bayes, GDA, GANs, diffusion for x).
  • Discriminative models usually classify better; generative models can sample new data and often work with less data or missing features.
Check yourself — multiple choice
  • Discriminative models learn P(x); generative learn P(yx)P(y \mid x)
  • Generative models learn joint P(x, y); discriminative learn P(yx)P(y \mid x)
  • They are the same
  • Only generative models can classify

Generative: joint distribution. Discriminative: conditional P(yx)P(y \mid x) directly.

#theory#classification

Practise Supervised Learning

215 interview questions in this topic.

Related questions