Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apache Mahout Essentials

You're reading from  Apache Mahout Essentials

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781783554997
Pages 164 pages
Edition 1st Edition
Languages
Author (1):
Jayani Withanawasam Jayani Withanawasam
Profile icon Jayani Withanawasam

The Naïve Bayes algorithm


The Naïve Bayes is a probabilistic classifier based on Bayes' theorem. This assumes strong (naive) independence assumptions between the features.

As long as features are not correlated and not repetitive, both Naïve Bayes and logistic regression will perform in a similar manner. However, when features are correlated and repetitive, the Naïve Bayes algorithm behaves differently due to its conditional independence assumption.

The Bayes theorem

This is the mathematical equation for the Bayes theorem:

Bayes theorem

Here, A and B are events:

  • P(A) and P(B) are the probabilities of A and B, independent of each other

  • P(A|B), a conditional probability, is the probability of A given that B is true

  • P(B|A), is the probability of B given that A is true

Text classification

Text classification is the task of classifying documents by their content (by the words that they contain). The best-known current text classification problem is e-mail spam filtering.

Note

Did you know?

Spam filtering...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}