Building a Spam Filter from Scratch — Part

By Medium - 2021-03-15

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.

 

Topics

  1. Machine_Learning (0.19)
  2. Backend (0.17)
  3. NLP (0.14)

Similar Articles

K-fold Cross Validation with PyTorch

By MachineCurve - 2021-02-02

Explanations and code examples showing you how to use K-fold Cross Validation for Machine Learning model evaluation/testing with PyTorch.