liveBook · Manning

Spam classification

As explained in Grokking Machine Learning, Second Edition

The task of determining whether an email is unwanted or non-spam mail.

Spam classification determines whether an email is unwanted spam or non-spam mail, also called ham. A simple model learns from earlier messages and predicts the likely category of a new one. section 1.11

Bob’s email history

Remember the last 10 emails from Bob: six were spam and four were ham. Formulate the rule “six out of every 10 are spam,” then predict that a new email is 60% likely to be spam and classify it as spam. The prediction can still be wrong; later evaluation and improvement are needed. section 1.11

Figure 1.5 A very simple machine learning model

Visualizes the simple frequency-based model used to predict whether Bob’s next email is spam. section 1.11

How Grokking Machine Learning, Second Edition covers it

How deep it goes
Defines the task and works through a frequency-based prediction, but defers model evaluation and improvement.
Examples
Uses Bob’s last 10 emails, a six-to-four spam-to-ham count, and a 60% prediction for the next message.
What you can do after
Apply it with the remember-formulate-predict method to classify a new email from observed message history.
How it connects
Connects email classification with data, models, predictions, and machine learning.

Also explained in

Compare how 2 books explain spam classification →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning, Second Edition. The section links point to the parts of the book it draws on.