Could someone provide differences between these two techniques? Also, I would very much appreciate if you could give an example of a ML method that falls into discriminative model or gnerative one. For instance, is Perceptron discriminative? K-Means?
[Math] generative vs discriminative machine learning
machine learning
Best Answer
Let $X$ be your observed data and let $Y$ be their unobserved/hidden properties. In a ML setting, $Y$ usually holds the categories of $X$.
A generative model models their joint distribution, $P(X,Y)$.
A discriminative model models the posterior probability of the categories, $P(Y|X)$.
Depending on what you want to do, you choose between generative versus discriminative modeling. For example, if you are interested in doing classification, a discriminative model would be your choice because you are interested in $P(Y|X)$. However, you can use a generative model, $P(X,Y)$, for classification, too.
A generative model allows you to generate synthetic data ($X$) using the joint but you cannot do this with a discriminative model.