Description
Creating a spam filter isn’t a new concept, but it’s important to understand the underlying theory that drives these predictions. Furthermore, understanding the theory behind machine learning…
Summary
- 1 Using a Naive Bayes algorithm to classify emails as spam or ham.
- Bayes Theorem for Spam To decide if an email is spam, we need to get a single probability 𝑃 for the whole email (𝑃1 to 𝑃n) and not just for the single words.
- Here is the formula for this: From here, the classifier needs to keep track of tokens, counts and labels from the training data.