Text Classification with Naive Bayes

Class 3 — July 16, 2020

What is Naive Bayes?

How does Naive Bayes work?

  1. Pick your training corpus
    • List of documents with their labels (e.g. list of emails and whether or not each email is spam)
  2. Represent each document as a “bag of words”
    • Downside: word order isn’t used
  3. Count how many times each word appears
  4. Work through the math

In class, I went through a couple derivations and a simplified example. If you’d like to review these, they’re very well illustrated in the reading below.

Additional Resources