liveBook · Manning

Ham email

As explained in Grokking Machine Learning

An email that is not spam or otherwise unwanted.

Ham is email that is not spam or otherwise unwanted. In spam detection, it is the class contrasted with junk email. section 8.2 section 1.3

A spam-detection model estimates whether an email is spam or ham. For example, among 100 emails, 80 ham messages give an estimated ham prior of 0.8. section 8.2

Figure 8.5 We have removed (grayed out) the emails that don’t contain the word lottery. All of a sudden, our probabilities change. Among the emails that contain the word lottery, there are 15 spam emails and 5 ham emails, so the probability that an email containing the word lottery is spam, is 15/20 = 0.75.

Among 20 emails containing “lottery,” five are ham and 15 are spam; the figure illustrates how a word changes the class proportions. section 8.2

A familiar comparison

In a history of 10 emails from Bob, four are ham and six are spam. The two labels provide the counts used to form a simple prediction rule. section 1.3

How Grokking Machine Learning covers it

How deep it goes
Defines ham and uses it in prior and word-conditioned probability calculations, without developing it as a separate topic.
Examples
Uses Bob’s email history and datasets containing 100 messages or the word “lottery” to illustrate ham counts.
What you can do after
Understand how non-spam email functions as the comparison class in probability-based spam detection.
How it connects
Connects ham with spam detection, naive Bayes, probability, and email features such as words.

Related concepts

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