๐Ÿคฆโ€โ™‚๏ธ Naive Bayes

= a simple (โ€œnaiveโ€) ๐Ÿ‘ฎโ€โ™‚๏ธ Supervised machine learning method for ๐Ÿท Classifier based on bayes rule

Formal definition

Assumptions

  • Bag of words assumption: Word position doesnโ€™t matter
  • Conditional independence: Feature probabilities are independent of the class

Formula

Calculating

Using the formula above, can be calculated:

  1. ๐Ÿ” Maximum likelihood estimation:
    • = fraction of times word appears among all words of topic

Problems

  • Zero-probabilities: โ†’ smoothing (= add +1 to each word count)
  • Unknown-words: โ†’ ignore them

๐Ÿ‘ Pros

  • fast, low storage
  • robust to irrelevant features
  • good all-rounder (โ€œBayes has never failed meโ€)

๐Ÿ“– Example: