🤖 Machine Learning / AI
Intermediate
What is the difference between discriminative and generative models?
Answer
Discriminative models learn the decision boundary between classes — they model P(y|x), the probability of the label given the input. Examples: logistic regression, SVM, neural network classifiers. They focus on what makes inputs different. Generative models learn the joint distribution P(x, y) or P(x) — they can generate new data points similar to the training data. Examples: Naive Bayes, GANs, VAEs, diffusion models. Discriminative models generally achieve better classification accuracy; generative models are richer (handle missing data, generate samples) but harder to train.
More Machine Learning / AI Questions
View all →- Intermediate What is a convolutional neural network (CNN)?
- Intermediate What is a Recurrent Neural Network (RNN)?
- Intermediate What is an LSTM and how does it solve the vanishing gradient problem?
- Intermediate What is the attention mechanism in neural networks?
- Intermediate What is the Transformer architecture?