8 Using probability to its maximum: The naive Bayes model

In this chapter

  • what is Bayes theorem
  • dependent and independent events
  • the prior and posterior probabilities
  • calculating conditional probabilities based on events
  • using the naive Bayes model to predict whether an email is spam or ham, based on the words in the email
  • coding the naive Bayes algorithm in Python

Naive Bayes is an important machine learning model used for classification. The naive Bayes model is a purely probabilistic model, which means the prediction is a number between 0 and 1, indicating the probability that a label is positive. The main component of the naive Bayes model ...

Get Grokking Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.