In this post we are going to explore the differences between generative and discriminative models. In many machine learning tasks we assume that the output can be generate from some function , which is dependant on the input. We assume that we can model this function using the conditional probability .
Now there are two fundamentally different approaches to estimating :
Generative models¶
A generative model calculates the joint probability density , which can also be used to generate new data pairs or to discriminate using Bayes’ rule:
Examples for generative models include: linear discriminant analysis and naive Bayes’ classifier.
Discriminative models¶
A discriminative model on the other hand only “learns” the posterior probability and is not able to generate new data.
Examples for discriminative models are: logistic regression, support vector machines and decision trees.
More generally we can say that a generative model learns the distribution of the classes, so that we can generate new instances, while a discriminative model learns the decision boundary between the classes.