EasyDeepLearn

How does Bayes' theorem drive Naive Bayes classification?

easy

Answer

  • For class c and features x, P(c    x)P(c\; \mid \;x)P(x    c)    P(c)P(x\; \mid \;c)\; \cdot \;P(c).
  • Naive Bayes assumes features are conditionally independent given the class: P(x    c)  =  prodjP(x\; \mid \;c)\; = \;\mathrm{prod}_{j} P(xj    c)P(x_{j}\; \mid \;c).
  • This lets you estimate each P(xj    c)P(x_{j}\; \mid \;c) separately (very fast, needs little data per parameter).
  • At prediction time you pick the class with the largest posterior score.
  • Priors P(c) are usually class frequencies; likelihoods P(xj    c)P(x_{j}\; \mid \;c) come from a chosen distribution (Gaussian, Multinomial, Bernoulli).
Check yourself — multiple choice
  • It maximizes likelihood, ignoring priors
  • P(cx)P(c \mid x)P(xc)    P(c)P(x \mid c)\; \cdot \;P(c) with conditional independence of features given the class
  • It requires features to be Gaussian
  • It cannot handle multi-class

Bayes' rule + conditional feature independence given the class.

#naive-bayes#classification#theory

Practise Supervised Learning

215 interview questions in this topic.

Related questions