title: Why is naïve Bayes generative?
body: <p>I am working on a document which should contain the key differences between using Naive Bayes (generative) and Logistic Regression (discriminative) models for text classification.</p>
  
  <p>During my research, I ran into this definition for Naive Bayes model: <a href="https://nlp.stanford.edu/IR-book/html/htmledition/naive-bayes-text-classification-1.html" rel="noreferrer">https://nlp.stanford.edu/IR-book/html/htmledition/naive-bayes-text-classification-1.html</a></p>
  
  <blockquote>
    <p>The probability of a document <code>d</code> being in class <code>c</code> is computed as ... where <code>p(tk|c)</code> is the <strong><em>conditional probability</em></strong> of term <code>tk</code> occurring in a document of class <code>c</code>...</p>
  </blockquote>
  
  <p><br>
  When I got to the part of comparing Generative and Discriminative models, I found this explanation on StackOverflow as accepted: <a href="https://stackoverflow.com/questions/879432/what-is-the-difference-between-a-generative-and-discriminative-algorithm">What is the difference between a Generative and Discriminative Algorithm?</a></p>
  
  <blockquote>
    <p>A <strong><em>generative model</em></strong> learns the <strong><em>joint probability</em></strong> distribution <code>p(x,y)</code> and a <strong><em>discriminative model</em></strong> learns the <strong><em>conditional probability</em></strong> distribution <code>p(y|x)</code> - which you should read as "the probability of y given x".</p>
  </blockquote>
  
  <p><br>
  At this point I got confused: Naive Bayes is a generative model and uses conditional probabilities, but at the same time the discriminative models were described as if they learned the conditional probabilities as opposed to the joint probabilities of the generative models.</p>
  
  <p><br></p>
  
  <p>Can someone shed some light on this please?</p>
  
  <p>Thank you!</p>