Generative vs discriminative classifier — what's the difference?
mediumAnswer
- A discriminative model learns directly (logistic regression, SVM, neural nets).
- A generative model learns P(x, y) or and applies Bayes' rule to get (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
- Generative models learn joint P(x, y); discriminative learn
- They are the same
- Only generative models can classify
Generative: joint distribution. Discriminative: conditional directly.
#theory#classification
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- How does Bayes' theorem drive Naive Bayes classification?
- Precision vs recall — when do you optimize each?
- Why is logistic regression called a linear model if it uses a sigmoid?
- How do you read a confusion matrix and derive the key metrics?
- What is the curse of dimensionality?
- Parametric vs non-parametric models — what's the difference?