Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the context of machine learning, does anyone know what is the difference betweeen the above?

share|cite|improve this question
up vote 0 down vote accepted

A good reference is "On Discriminative vs. Generative classifiers: A comparison of logistic regression and naive Bayes" by Andrew Ng and Michael Jordan. The basic gist is if y is your output and x is your input, then a discriminative classifier will model P(y|x) (so the probability of y given x) while a generative classifier will model P(y,x).

There are several consequences of this difference, and the paper by Ng and Jordan discusses many of them. One is that asymptotically (i.e. for very large sample sizes) discriminative classifiers will perform better, but for smaller samples generative classifiers can perform better. Another difference is you can generate a synthetic dataset from a trained generative classifier if you can sample from the probability distribution, but for a discriminative classifier you can only sample outputs y for a given x.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.