Performing naïve Bayes classification
Let’s get right into it! Let’s begin with naïve Bayes classification. This ML model relies heavily on results from previous chapters, specifically with Bayes’ theorem:
Let’s look a little closer at the specific features of this formula:
- P(H) is the probability of the hypothesis before we observe the data, called the prior probability, or just prior
- P(H|D) is what we want to compute: the probability of the hypothesis after we observe the data, called the posterior
- P(D|H) is the probability of the data under the given hypothesis, called the likelihood
- P(D) is the probability of the data under any hypothesis, called the normalizing constant
Naïve Bayes classification is a classification model, and therefore a supervised model. Given this, what kind of data do we need – labeled or unlabeled data?
(Insert Jeopardy music here)
If you answered labeled data, then...