Skip to content
DoingCamp CS

Make it comfy

Lesson style

Quick mode shows the key picture, a summary and the practice. Good for a refresher.

Theme
Font

Both fonts are designed to be easy to read. Some readers with dyslexia prefer Lexend.

Text size
Spacing
Animations

Lesson 20 of 20 · about 22 min

Boss level: a Naive Bayes spam filter

Put the whole course to work. You'll build the same kind of spam filter that rescued email inboxes in the early 2000s, from nothing but counting words and Bayes' rule. Train it on example messages, fix the two problems that break the simple version (zero counts and vanishing numbers), and measure how accurate it is on mail it has never seen.

🔓 Unlock this lesson

This lesson is part of the DoingCamp Pass. Members get every lesson in every course, with all the interactive visuals, coding exercises and challenges.

In this lesson you'll learn:

  • Naive Bayes classifier
  • Laplace smoothing and log probabilities

Free to try in F07 Probability & Statistics:

The first 3 lessons of every course are free, no account needed.