The equation at the center of naive Bayes is an application of Bayes theorem.
The posterior probability P (cat | doc) is the probability that it is the category cat given the document doc. Unknown documents for which you want to predict categories are classified into categories with the highest posterior probability (MAP estimation). In order to calculate this probability, the prior probability P (cat) on the right side and the likelihood P (doc | cat) are required. P (doc) is common to all categories and can be ignored. The posterior probability P (cat | doc) and the likelihood P (doc | cat) are confusing but different.
Title | Detail |
---|---|
Environment | MacOS Mojave 10.14.3 |
Language | Python |
Library | scikit-learn, Numpy, matplotlib, Pandas, Seaborn |
Dataset | |
Algorithm | Gaussian Naive Bayes |