# intuition behind the difference between likelihood function of discriminative and generative algorithms

I am currently studying the online material of Stanford CS229 and I came across the likelihood function for discriminative(for example, regression) and generative algorithms(for example, naive bayes): +Discriminative:

+Generative:

In both cases, m is the number of training examples and all training examples are independent of each other. What I am wondering is why in discriminative likelihood function, the formula is the product of conditional probability of y given x and in generative likelihood function, the formula is the product of joint probability of x and y? Is there some reasoning behind this choice?

• It might be a simple mistake, but "i.e." implies equality. Discriminative models are not synonymous with regression, and generative models are not synonymous with Naive Bayes.
– Emre
Jun 8, 2017 at 15:57
• Oh yeah I am sorry for the mistake as english is not my first language. I'm just trying to show an example for each discriminative and generative model. Jun 8, 2017 at 18:14
• That's okay, I assumed you meant "e.g.". To answer your question, generative models allow you to generate samples from the joint distribution. Discriminative models don't learn the distribution of X so reducing complexity if it is not desired (don't model what you don't need). Generative models, on the other hand, allow you to marginalize over missing data.
– Emre
Jun 8, 2017 at 18:31